@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.
package/dist/index.mjs CHANGED
@@ -3146,15 +3146,20 @@ var sesame = $root.sesame = (() => {
3146
3146
  values[valuesById[4] = "VIDEO_FORMAT_1080_60P"] = 4;
3147
3147
  return values;
3148
3148
  }();
3149
- common.CodecId = function() {
3149
+ common.CodecType = function() {
3150
3150
  const valuesById = {}, values = Object.create(valuesById);
3151
- values[valuesById[0] = "CODEC_ID_UNSPECIFIED"] = 0;
3152
- values[valuesById[1] = "CODEC_ID_H264"] = 1;
3153
- values[valuesById[2] = "CODEC_ID_HEVC"] = 2;
3154
- values[valuesById[3] = "CODEC_ID_AV1"] = 3;
3155
- values[valuesById[4] = "CODEC_ID_VP8"] = 4;
3156
- values[valuesById[5] = "CODEC_ID_PRORES"] = 5;
3157
- values[valuesById[6] = "CODEC_ID_DNXHR"] = 6;
3151
+ values[valuesById[0] = "CODEC_TYPE_UNSPECIFIED"] = 0;
3152
+ values[valuesById[1] = "CODEC_TYPE_VIDEO_VP8"] = 1;
3153
+ values[valuesById[2] = "CODEC_TYPE_VIDEO_VP9"] = 2;
3154
+ values[valuesById[3] = "CODEC_TYPE_VIDEO_AVC"] = 3;
3155
+ values[valuesById[4] = "CODEC_TYPE_VIDEO_HEVC"] = 4;
3156
+ values[valuesById[5] = "CODEC_TYPE_VIDEO_AV1"] = 5;
3157
+ values[valuesById[6] = "CODEC_TYPE_VIDEO_PRORES"] = 6;
3158
+ values[valuesById[7] = "CODEC_TYPE_VIDEO_DNXHR"] = 7;
3159
+ values[valuesById[64] = "CODEC_TYPE_AUDIO_OPUS"] = 64;
3160
+ values[valuesById[65] = "CODEC_TYPE_AUDIO_AAC"] = 65;
3161
+ values[valuesById[66] = "CODEC_TYPE_AUDIO_PCM"] = 66;
3162
+ values[valuesById[67] = "CODEC_TYPE_AUDIO_PCM_S24LE"] = 67;
3158
3163
  return values;
3159
3164
  }();
3160
3165
  common.Empty = function() {
@@ -3742,7 +3747,7 @@ var sesame = $root.sesame = (() => {
3742
3747
  }
3743
3748
  }
3744
3749
  NameValue.prototype.name = "";
3745
- NameValue.prototype.value = "";
3750
+ NameValue.prototype.value = null;
3746
3751
  NameValue.create = function create(properties) {
3747
3752
  return new NameValue(properties);
3748
3753
  };
@@ -3755,10 +3760,10 @@ var sesame = $root.sesame = (() => {
3755
3760
  10
3756
3761
  ).string(message.name);
3757
3762
  if (message.value != null && Object.hasOwnProperty.call(message, "value"))
3758
- writer.uint32(
3763
+ $root.sesame.v1.common.PropValue.encode(message.value, writer.uint32(
3759
3764
  /* id 2, wireType 2 =*/
3760
3765
  18
3761
- ).string(message.value);
3766
+ ).fork()).ldelim();
3762
3767
  return writer;
3763
3768
  };
3764
3769
  NameValue.encodeDelimited = function encodeDelimited(message, writer) {
@@ -3778,7 +3783,7 @@ var sesame = $root.sesame = (() => {
3778
3783
  break;
3779
3784
  }
3780
3785
  case 2: {
3781
- message.value = reader.string();
3786
+ message.value = $root.sesame.v1.common.PropValue.decode(reader, reader.uint32());
3782
3787
  break;
3783
3788
  }
3784
3789
  default:
@@ -3801,8 +3806,9 @@ var sesame = $root.sesame = (() => {
3801
3806
  return "name: string expected";
3802
3807
  }
3803
3808
  if (message.value != null && message.hasOwnProperty("value")) {
3804
- if (!$util.isString(message.value))
3805
- return "value: string expected";
3809
+ let error = $root.sesame.v1.common.PropValue.verify(message.value);
3810
+ if (error)
3811
+ return "value." + error;
3806
3812
  }
3807
3813
  return null;
3808
3814
  };
@@ -3812,8 +3818,11 @@ var sesame = $root.sesame = (() => {
3812
3818
  let message = new $root.sesame.v1.common.NameValue();
3813
3819
  if (object.name != null)
3814
3820
  message.name = String(object.name);
3815
- if (object.value != null)
3816
- message.value = String(object.value);
3821
+ if (object.value != null) {
3822
+ if (typeof object.value !== "object")
3823
+ throw TypeError(".sesame.v1.common.NameValue.value: object expected");
3824
+ message.value = $root.sesame.v1.common.PropValue.fromObject(object.value);
3825
+ }
3817
3826
  return message;
3818
3827
  };
3819
3828
  NameValue.toObject = function toObject(message, options) {
@@ -3822,12 +3831,12 @@ var sesame = $root.sesame = (() => {
3822
3831
  let object = {};
3823
3832
  if (options.defaults) {
3824
3833
  object.name = "";
3825
- object.value = "";
3834
+ object.value = null;
3826
3835
  }
3827
3836
  if (message.name != null && message.hasOwnProperty("name"))
3828
3837
  object.name = message.name;
3829
3838
  if (message.value != null && message.hasOwnProperty("value"))
3830
- object.value = message.value;
3839
+ object.value = $root.sesame.v1.common.PropValue.toObject(message.value, options);
3831
3840
  return object;
3832
3841
  };
3833
3842
  NameValue.prototype.toJSON = function toJSON() {
@@ -4063,8 +4072,7 @@ var sesame = $root.sesame = (() => {
4063
4072
  values[valuesById[1] = "EVENT_TOPIC_ERROR"] = 1;
4064
4073
  values[valuesById[2] = "EVENT_TOPIC_TRANSPORT"] = 2;
4065
4074
  values[valuesById[3] = "EVENT_TOPIC_CALLBACK"] = 3;
4066
- values[valuesById[4] = "EVENT_TOPIC_PLAYLIST_EXPORT"] = 4;
4067
- values[valuesById[5] = "EVENT_TOPIC_CLIP_IMPORT"] = 5;
4075
+ values[valuesById[4] = "EVENT_TOPIC_JOB"] = 4;
4068
4076
  values[valuesById[6] = "EVENT_TOPIC_RECORDER"] = 6;
4069
4077
  return values;
4070
4078
  }();
@@ -4124,14 +4132,6 @@ var sesame = $root.sesame = (() => {
4124
4132
  values[valuesById[15] = "SOURCE_TRANSPORT_CMD_SET_SCRUBBING"] = 15;
4125
4133
  return values;
4126
4134
  }();
4127
- sources.DecoderType = function() {
4128
- const valuesById = {}, values = Object.create(valuesById);
4129
- values[valuesById[0] = "DECODER_TYPE_UNSPECIFIED"] = 0;
4130
- values[valuesById[1] = "DECODER_TYPE_H264"] = 1;
4131
- values[valuesById[2] = "DECODER_TYPE_HEVC"] = 2;
4132
- values[valuesById[3] = "DECODER_TYPE_AV1"] = 3;
4133
- return values;
4134
- }();
4135
4135
  sources.SourceTextureSize = function() {
4136
4136
  const valuesById = {}, values = Object.create(valuesById);
4137
4137
  values[valuesById[0] = "SOURCE_TEXTURE_SIZE_UNSPECIFIED"] = 0;
@@ -4893,7 +4893,7 @@ var sesame = $root.sesame = (() => {
4893
4893
  }
4894
4894
  }
4895
4895
  RecorderSourceConfig.prototype.recorderId = "";
4896
- RecorderSourceConfig.prototype.decoderType = 0;
4896
+ RecorderSourceConfig.prototype.codec = 0;
4897
4897
  RecorderSourceConfig.create = function create(properties) {
4898
4898
  return new RecorderSourceConfig(properties);
4899
4899
  };
@@ -4905,11 +4905,11 @@ var sesame = $root.sesame = (() => {
4905
4905
  /* id 1, wireType 2 =*/
4906
4906
  10
4907
4907
  ).string(message.recorderId);
4908
- if (message.decoderType != null && Object.hasOwnProperty.call(message, "decoderType"))
4908
+ if (message.codec != null && Object.hasOwnProperty.call(message, "codec"))
4909
4909
  writer.uint32(
4910
4910
  /* id 2, wireType 0 =*/
4911
4911
  16
4912
- ).int32(message.decoderType);
4912
+ ).int32(message.codec);
4913
4913
  return writer;
4914
4914
  };
4915
4915
  RecorderSourceConfig.encodeDelimited = function encodeDelimited(message, writer) {
@@ -4929,7 +4929,7 @@ var sesame = $root.sesame = (() => {
4929
4929
  break;
4930
4930
  }
4931
4931
  case 2: {
4932
- message.decoderType = reader.int32();
4932
+ message.codec = reader.int32();
4933
4933
  break;
4934
4934
  }
4935
4935
  default:
@@ -4951,14 +4951,22 @@ var sesame = $root.sesame = (() => {
4951
4951
  if (!$util.isString(message.recorderId))
4952
4952
  return "recorderId: string expected";
4953
4953
  }
4954
- if (message.decoderType != null && message.hasOwnProperty("decoderType"))
4955
- switch (message.decoderType) {
4954
+ if (message.codec != null && message.hasOwnProperty("codec"))
4955
+ switch (message.codec) {
4956
4956
  default:
4957
- return "decoderType: enum value expected";
4957
+ return "codec: enum value expected";
4958
4958
  case 0:
4959
4959
  case 1:
4960
4960
  case 2:
4961
4961
  case 3:
4962
+ case 4:
4963
+ case 5:
4964
+ case 6:
4965
+ case 7:
4966
+ case 64:
4967
+ case 65:
4968
+ case 66:
4969
+ case 67:
4962
4970
  break;
4963
4971
  }
4964
4972
  return null;
@@ -4969,28 +4977,60 @@ var sesame = $root.sesame = (() => {
4969
4977
  let message = new $root.sesame.v1.sources.RecorderSourceConfig();
4970
4978
  if (object.recorderId != null)
4971
4979
  message.recorderId = String(object.recorderId);
4972
- switch (object.decoderType) {
4980
+ switch (object.codec) {
4973
4981
  default:
4974
- if (typeof object.decoderType === "number") {
4975
- message.decoderType = object.decoderType;
4982
+ if (typeof object.codec === "number") {
4983
+ message.codec = object.codec;
4976
4984
  break;
4977
4985
  }
4978
4986
  break;
4979
- case "DECODER_TYPE_UNSPECIFIED":
4987
+ case "CODEC_TYPE_UNSPECIFIED":
4980
4988
  case 0:
4981
- message.decoderType = 0;
4989
+ message.codec = 0;
4982
4990
  break;
4983
- case "DECODER_TYPE_H264":
4991
+ case "CODEC_TYPE_VIDEO_VP8":
4984
4992
  case 1:
4985
- message.decoderType = 1;
4993
+ message.codec = 1;
4986
4994
  break;
4987
- case "DECODER_TYPE_HEVC":
4995
+ case "CODEC_TYPE_VIDEO_VP9":
4988
4996
  case 2:
4989
- message.decoderType = 2;
4997
+ message.codec = 2;
4990
4998
  break;
4991
- case "DECODER_TYPE_AV1":
4999
+ case "CODEC_TYPE_VIDEO_AVC":
4992
5000
  case 3:
4993
- message.decoderType = 3;
5001
+ message.codec = 3;
5002
+ break;
5003
+ case "CODEC_TYPE_VIDEO_HEVC":
5004
+ case 4:
5005
+ message.codec = 4;
5006
+ break;
5007
+ case "CODEC_TYPE_VIDEO_AV1":
5008
+ case 5:
5009
+ message.codec = 5;
5010
+ break;
5011
+ case "CODEC_TYPE_VIDEO_PRORES":
5012
+ case 6:
5013
+ message.codec = 6;
5014
+ break;
5015
+ case "CODEC_TYPE_VIDEO_DNXHR":
5016
+ case 7:
5017
+ message.codec = 7;
5018
+ break;
5019
+ case "CODEC_TYPE_AUDIO_OPUS":
5020
+ case 64:
5021
+ message.codec = 64;
5022
+ break;
5023
+ case "CODEC_TYPE_AUDIO_AAC":
5024
+ case 65:
5025
+ message.codec = 65;
5026
+ break;
5027
+ case "CODEC_TYPE_AUDIO_PCM":
5028
+ case 66:
5029
+ message.codec = 66;
5030
+ break;
5031
+ case "CODEC_TYPE_AUDIO_PCM_S24LE":
5032
+ case 67:
5033
+ message.codec = 67;
4994
5034
  break;
4995
5035
  }
4996
5036
  return message;
@@ -5001,12 +5041,12 @@ var sesame = $root.sesame = (() => {
5001
5041
  let object = {};
5002
5042
  if (options.defaults) {
5003
5043
  object.recorderId = "";
5004
- object.decoderType = options.enums === String ? "DECODER_TYPE_UNSPECIFIED" : 0;
5044
+ object.codec = options.enums === String ? "CODEC_TYPE_UNSPECIFIED" : 0;
5005
5045
  }
5006
5046
  if (message.recorderId != null && message.hasOwnProperty("recorderId"))
5007
5047
  object.recorderId = message.recorderId;
5008
- if (message.decoderType != null && message.hasOwnProperty("decoderType"))
5009
- 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;
5048
+ if (message.codec != null && message.hasOwnProperty("codec"))
5049
+ 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;
5010
5050
  return object;
5011
5051
  };
5012
5052
  RecorderSourceConfig.prototype.toJSON = function toJSON() {
@@ -8180,7 +8220,7 @@ var sesame = $root.sesame = (() => {
8180
8220
  RecorderClip.prototype.endTimeUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
8181
8221
  RecorderClip.prototype.lockedStartUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
8182
8222
  RecorderClip.prototype.lockedEndUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
8183
- RecorderClip.prototype.userTimeMs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
8223
+ RecorderClip.prototype.userTimeUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
8184
8224
  RecorderClip.create = function create(properties) {
8185
8225
  return new RecorderClip(properties);
8186
8226
  };
@@ -8227,11 +8267,11 @@ var sesame = $root.sesame = (() => {
8227
8267
  /* id 8, wireType 0 =*/
8228
8268
  64
8229
8269
  ).int64(message.lockedEndUs);
8230
- if (message.userTimeMs != null && Object.hasOwnProperty.call(message, "userTimeMs"))
8270
+ if (message.userTimeUs != null && Object.hasOwnProperty.call(message, "userTimeUs"))
8231
8271
  writer.uint32(
8232
8272
  /* id 9, wireType 0 =*/
8233
8273
  72
8234
- ).int64(message.userTimeMs);
8274
+ ).int64(message.userTimeUs);
8235
8275
  return writer;
8236
8276
  };
8237
8277
  RecorderClip.encodeDelimited = function encodeDelimited(message, writer) {
@@ -8279,7 +8319,7 @@ var sesame = $root.sesame = (() => {
8279
8319
  break;
8280
8320
  }
8281
8321
  case 9: {
8282
- message.userTimeMs = reader.int64();
8322
+ message.userTimeUs = reader.int64();
8283
8323
  break;
8284
8324
  }
8285
8325
  default:
@@ -8329,9 +8369,9 @@ var sesame = $root.sesame = (() => {
8329
8369
  if (!$util.isInteger(message.lockedEndUs) && !(message.lockedEndUs && $util.isInteger(message.lockedEndUs.low) && $util.isInteger(message.lockedEndUs.high)))
8330
8370
  return "lockedEndUs: integer|Long expected";
8331
8371
  }
8332
- if (message.userTimeMs != null && message.hasOwnProperty("userTimeMs")) {
8333
- if (!$util.isInteger(message.userTimeMs) && !(message.userTimeMs && $util.isInteger(message.userTimeMs.low) && $util.isInteger(message.userTimeMs.high)))
8334
- return "userTimeMs: integer|Long expected";
8372
+ if (message.userTimeUs != null && message.hasOwnProperty("userTimeUs")) {
8373
+ if (!$util.isInteger(message.userTimeUs) && !(message.userTimeUs && $util.isInteger(message.userTimeUs.low) && $util.isInteger(message.userTimeUs.high)))
8374
+ return "userTimeUs: integer|Long expected";
8335
8375
  }
8336
8376
  return null;
8337
8377
  };
@@ -8403,15 +8443,15 @@ var sesame = $root.sesame = (() => {
8403
8443
  else if (typeof object.lockedEndUs === "object")
8404
8444
  message.lockedEndUs = new $util.LongBits(object.lockedEndUs.low >>> 0, object.lockedEndUs.high >>> 0).toNumber();
8405
8445
  }
8406
- if (object.userTimeMs != null) {
8446
+ if (object.userTimeUs != null) {
8407
8447
  if ($util.Long)
8408
- (message.userTimeMs = $util.Long.fromValue(object.userTimeMs)).unsigned = false;
8409
- else if (typeof object.userTimeMs === "string")
8410
- message.userTimeMs = parseInt(object.userTimeMs, 10);
8411
- else if (typeof object.userTimeMs === "number")
8412
- message.userTimeMs = object.userTimeMs;
8413
- else if (typeof object.userTimeMs === "object")
8414
- message.userTimeMs = new $util.LongBits(object.userTimeMs.low >>> 0, object.userTimeMs.high >>> 0).toNumber();
8448
+ (message.userTimeUs = $util.Long.fromValue(object.userTimeUs)).unsigned = false;
8449
+ else if (typeof object.userTimeUs === "string")
8450
+ message.userTimeUs = parseInt(object.userTimeUs, 10);
8451
+ else if (typeof object.userTimeUs === "number")
8452
+ message.userTimeUs = object.userTimeUs;
8453
+ else if (typeof object.userTimeUs === "object")
8454
+ message.userTimeUs = new $util.LongBits(object.userTimeUs.low >>> 0, object.userTimeUs.high >>> 0).toNumber();
8415
8455
  }
8416
8456
  return message;
8417
8457
  };
@@ -8454,9 +8494,9 @@ var sesame = $root.sesame = (() => {
8454
8494
  object.lockedEndUs = options.longs === String ? "0" : 0;
8455
8495
  if ($util.Long) {
8456
8496
  let long = new $util.Long(0, 0, false);
8457
- object.userTimeMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
8497
+ object.userTimeUs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
8458
8498
  } else
8459
- object.userTimeMs = options.longs === String ? "0" : 0;
8499
+ object.userTimeUs = options.longs === String ? "0" : 0;
8460
8500
  }
8461
8501
  if (message.id != null && message.hasOwnProperty("id"))
8462
8502
  if (typeof message.id === "number")
@@ -8492,11 +8532,11 @@ var sesame = $root.sesame = (() => {
8492
8532
  object.lockedEndUs = options.longs === String ? String(message.lockedEndUs) : message.lockedEndUs;
8493
8533
  else
8494
8534
  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;
8495
- if (message.userTimeMs != null && message.hasOwnProperty("userTimeMs"))
8496
- if (typeof message.userTimeMs === "number")
8497
- object.userTimeMs = options.longs === String ? String(message.userTimeMs) : message.userTimeMs;
8535
+ if (message.userTimeUs != null && message.hasOwnProperty("userTimeUs"))
8536
+ if (typeof message.userTimeUs === "number")
8537
+ object.userTimeUs = options.longs === String ? String(message.userTimeUs) : message.userTimeUs;
8498
8538
  else
8499
- 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;
8539
+ 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;
8500
8540
  return object;
8501
8541
  };
8502
8542
  RecorderClip.prototype.toJSON = function toJSON() {
@@ -13304,15 +13344,22 @@ var sesame = $root.sesame = (() => {
13304
13344
  }
13305
13345
  TransportEvent.prototype.sourceId = "";
13306
13346
  TransportEvent.prototype.userId = "";
13347
+ TransportEvent.prototype.uri = "";
13307
13348
  TransportEvent.prototype.state = 0;
13308
13349
  TransportEvent.prototype.durationUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
13309
13350
  TransportEvent.prototype.positionUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
13310
13351
  TransportEvent.prototype.materialPositionUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
13352
+ TransportEvent.prototype.userTimeUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
13353
+ TransportEvent.prototype.speed = 0;
13311
13354
  TransportEvent.prototype.userPlaylistId = "";
13312
13355
  TransportEvent.prototype.playlistIndex = 0;
13313
13356
  TransportEvent.prototype.playlistLength = 0;
13314
13357
  TransportEvent.prototype.clipId = $util.Long ? $util.Long.fromBits(0, 0, true) : 0;
13315
13358
  TransportEvent.prototype.clipPositionUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
13359
+ TransportEvent.prototype.clipDurationUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
13360
+ TransportEvent.prototype.preroll = 0;
13361
+ TransportEvent.prototype.postroll = 0;
13362
+ TransportEvent.prototype.metadata = null;
13316
13363
  TransportEvent.create = function create(properties) {
13317
13364
  return new TransportEvent(properties);
13318
13365
  };
@@ -13329,51 +13376,86 @@ var sesame = $root.sesame = (() => {
13329
13376
  /* id 2, wireType 2 =*/
13330
13377
  18
13331
13378
  ).string(message.userId);
13379
+ if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
13380
+ writer.uint32(
13381
+ /* id 3, wireType 2 =*/
13382
+ 26
13383
+ ).string(message.uri);
13332
13384
  if (message.state != null && Object.hasOwnProperty.call(message, "state"))
13333
13385
  writer.uint32(
13334
- /* id 3, wireType 0 =*/
13335
- 24
13386
+ /* id 4, wireType 0 =*/
13387
+ 32
13336
13388
  ).int32(message.state);
13337
13389
  if (message.durationUs != null && Object.hasOwnProperty.call(message, "durationUs"))
13338
13390
  writer.uint32(
13339
- /* id 4, wireType 0 =*/
13340
- 32
13391
+ /* id 5, wireType 0 =*/
13392
+ 40
13341
13393
  ).int64(message.durationUs);
13342
13394
  if (message.positionUs != null && Object.hasOwnProperty.call(message, "positionUs"))
13343
13395
  writer.uint32(
13344
- /* id 5, wireType 0 =*/
13345
- 40
13396
+ /* id 6, wireType 0 =*/
13397
+ 48
13346
13398
  ).int64(message.positionUs);
13347
13399
  if (message.materialPositionUs != null && Object.hasOwnProperty.call(message, "materialPositionUs"))
13348
13400
  writer.uint32(
13349
- /* id 6, wireType 0 =*/
13350
- 48
13401
+ /* id 7, wireType 0 =*/
13402
+ 56
13351
13403
  ).int64(message.materialPositionUs);
13404
+ if (message.userTimeUs != null && Object.hasOwnProperty.call(message, "userTimeUs"))
13405
+ writer.uint32(
13406
+ /* id 8, wireType 0 =*/
13407
+ 64
13408
+ ).int64(message.userTimeUs);
13409
+ if (message.speed != null && Object.hasOwnProperty.call(message, "speed"))
13410
+ writer.uint32(
13411
+ /* id 9, wireType 5 =*/
13412
+ 77
13413
+ ).float(message.speed);
13352
13414
  if (message.userPlaylistId != null && Object.hasOwnProperty.call(message, "userPlaylistId"))
13353
13415
  writer.uint32(
13354
- /* id 7, wireType 2 =*/
13355
- 58
13416
+ /* id 10, wireType 2 =*/
13417
+ 82
13356
13418
  ).string(message.userPlaylistId);
13357
13419
  if (message.playlistIndex != null && Object.hasOwnProperty.call(message, "playlistIndex"))
13358
13420
  writer.uint32(
13359
- /* id 8, wireType 0 =*/
13360
- 64
13421
+ /* id 11, wireType 0 =*/
13422
+ 88
13361
13423
  ).uint32(message.playlistIndex);
13362
13424
  if (message.playlistLength != null && Object.hasOwnProperty.call(message, "playlistLength"))
13363
13425
  writer.uint32(
13364
- /* id 9, wireType 0 =*/
13365
- 72
13426
+ /* id 12, wireType 0 =*/
13427
+ 96
13366
13428
  ).uint32(message.playlistLength);
13367
13429
  if (message.clipId != null && Object.hasOwnProperty.call(message, "clipId"))
13368
13430
  writer.uint32(
13369
- /* id 10, wireType 0 =*/
13370
- 80
13431
+ /* id 13, wireType 0 =*/
13432
+ 104
13371
13433
  ).uint64(message.clipId);
13372
13434
  if (message.clipPositionUs != null && Object.hasOwnProperty.call(message, "clipPositionUs"))
13373
13435
  writer.uint32(
13374
- /* id 11, wireType 0 =*/
13375
- 88
13436
+ /* id 14, wireType 0 =*/
13437
+ 112
13376
13438
  ).int64(message.clipPositionUs);
13439
+ if (message.clipDurationUs != null && Object.hasOwnProperty.call(message, "clipDurationUs"))
13440
+ writer.uint32(
13441
+ /* id 15, wireType 0 =*/
13442
+ 120
13443
+ ).int64(message.clipDurationUs);
13444
+ if (message.preroll != null && Object.hasOwnProperty.call(message, "preroll"))
13445
+ writer.uint32(
13446
+ /* id 16, wireType 0 =*/
13447
+ 128
13448
+ ).uint32(message.preroll);
13449
+ if (message.postroll != null && Object.hasOwnProperty.call(message, "postroll"))
13450
+ writer.uint32(
13451
+ /* id 17, wireType 0 =*/
13452
+ 136
13453
+ ).uint32(message.postroll);
13454
+ if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
13455
+ $root.sesame.v1.common.TransportMetadata.encode(message.metadata, writer.uint32(
13456
+ /* id 18, wireType 2 =*/
13457
+ 146
13458
+ ).fork()).ldelim();
13377
13459
  return writer;
13378
13460
  };
13379
13461
  TransportEvent.encodeDelimited = function encodeDelimited(message, writer) {
@@ -13397,41 +13479,69 @@ var sesame = $root.sesame = (() => {
13397
13479
  break;
13398
13480
  }
13399
13481
  case 3: {
13400
- message.state = reader.int32();
13482
+ message.uri = reader.string();
13401
13483
  break;
13402
13484
  }
13403
13485
  case 4: {
13404
- message.durationUs = reader.int64();
13486
+ message.state = reader.int32();
13405
13487
  break;
13406
13488
  }
13407
13489
  case 5: {
13408
- message.positionUs = reader.int64();
13490
+ message.durationUs = reader.int64();
13409
13491
  break;
13410
13492
  }
13411
13493
  case 6: {
13412
- message.materialPositionUs = reader.int64();
13494
+ message.positionUs = reader.int64();
13413
13495
  break;
13414
13496
  }
13415
13497
  case 7: {
13416
- message.userPlaylistId = reader.string();
13498
+ message.materialPositionUs = reader.int64();
13417
13499
  break;
13418
13500
  }
13419
13501
  case 8: {
13420
- message.playlistIndex = reader.uint32();
13502
+ message.userTimeUs = reader.int64();
13421
13503
  break;
13422
13504
  }
13423
13505
  case 9: {
13424
- message.playlistLength = reader.uint32();
13506
+ message.speed = reader.float();
13425
13507
  break;
13426
13508
  }
13427
13509
  case 10: {
13428
- message.clipId = reader.uint64();
13510
+ message.userPlaylistId = reader.string();
13429
13511
  break;
13430
13512
  }
13431
13513
  case 11: {
13514
+ message.playlistIndex = reader.uint32();
13515
+ break;
13516
+ }
13517
+ case 12: {
13518
+ message.playlistLength = reader.uint32();
13519
+ break;
13520
+ }
13521
+ case 13: {
13522
+ message.clipId = reader.uint64();
13523
+ break;
13524
+ }
13525
+ case 14: {
13432
13526
  message.clipPositionUs = reader.int64();
13433
13527
  break;
13434
13528
  }
13529
+ case 15: {
13530
+ message.clipDurationUs = reader.int64();
13531
+ break;
13532
+ }
13533
+ case 16: {
13534
+ message.preroll = reader.uint32();
13535
+ break;
13536
+ }
13537
+ case 17: {
13538
+ message.postroll = reader.uint32();
13539
+ break;
13540
+ }
13541
+ case 18: {
13542
+ message.metadata = $root.sesame.v1.common.TransportMetadata.decode(reader, reader.uint32());
13543
+ break;
13544
+ }
13435
13545
  default:
13436
13546
  reader.skipType(tag & 7);
13437
13547
  break;
@@ -13455,6 +13565,10 @@ var sesame = $root.sesame = (() => {
13455
13565
  if (!$util.isString(message.userId))
13456
13566
  return "userId: string expected";
13457
13567
  }
13568
+ if (message.uri != null && message.hasOwnProperty("uri")) {
13569
+ if (!$util.isString(message.uri))
13570
+ return "uri: string expected";
13571
+ }
13458
13572
  if (message.state != null && message.hasOwnProperty("state"))
13459
13573
  switch (message.state) {
13460
13574
  default:
@@ -13478,6 +13592,14 @@ var sesame = $root.sesame = (() => {
13478
13592
  if (!$util.isInteger(message.materialPositionUs) && !(message.materialPositionUs && $util.isInteger(message.materialPositionUs.low) && $util.isInteger(message.materialPositionUs.high)))
13479
13593
  return "materialPositionUs: integer|Long expected";
13480
13594
  }
13595
+ if (message.userTimeUs != null && message.hasOwnProperty("userTimeUs")) {
13596
+ if (!$util.isInteger(message.userTimeUs) && !(message.userTimeUs && $util.isInteger(message.userTimeUs.low) && $util.isInteger(message.userTimeUs.high)))
13597
+ return "userTimeUs: integer|Long expected";
13598
+ }
13599
+ if (message.speed != null && message.hasOwnProperty("speed")) {
13600
+ if (typeof message.speed !== "number")
13601
+ return "speed: number expected";
13602
+ }
13481
13603
  if (message.userPlaylistId != null && message.hasOwnProperty("userPlaylistId")) {
13482
13604
  if (!$util.isString(message.userPlaylistId))
13483
13605
  return "userPlaylistId: string expected";
@@ -13498,6 +13620,23 @@ var sesame = $root.sesame = (() => {
13498
13620
  if (!$util.isInteger(message.clipPositionUs) && !(message.clipPositionUs && $util.isInteger(message.clipPositionUs.low) && $util.isInteger(message.clipPositionUs.high)))
13499
13621
  return "clipPositionUs: integer|Long expected";
13500
13622
  }
13623
+ if (message.clipDurationUs != null && message.hasOwnProperty("clipDurationUs")) {
13624
+ if (!$util.isInteger(message.clipDurationUs) && !(message.clipDurationUs && $util.isInteger(message.clipDurationUs.low) && $util.isInteger(message.clipDurationUs.high)))
13625
+ return "clipDurationUs: integer|Long expected";
13626
+ }
13627
+ if (message.preroll != null && message.hasOwnProperty("preroll")) {
13628
+ if (!$util.isInteger(message.preroll))
13629
+ return "preroll: integer expected";
13630
+ }
13631
+ if (message.postroll != null && message.hasOwnProperty("postroll")) {
13632
+ if (!$util.isInteger(message.postroll))
13633
+ return "postroll: integer expected";
13634
+ }
13635
+ if (message.metadata != null && message.hasOwnProperty("metadata")) {
13636
+ let error = $root.sesame.v1.common.TransportMetadata.verify(message.metadata);
13637
+ if (error)
13638
+ return "metadata." + error;
13639
+ }
13501
13640
  return null;
13502
13641
  };
13503
13642
  TransportEvent.fromObject = function fromObject(object) {
@@ -13508,6 +13647,8 @@ var sesame = $root.sesame = (() => {
13508
13647
  message.sourceId = String(object.sourceId);
13509
13648
  if (object.userId != null)
13510
13649
  message.userId = String(object.userId);
13650
+ if (object.uri != null)
13651
+ message.uri = String(object.uri);
13511
13652
  switch (object.state) {
13512
13653
  default:
13513
13654
  if (typeof object.state === "number") {
@@ -13566,6 +13707,18 @@ var sesame = $root.sesame = (() => {
13566
13707
  else if (typeof object.materialPositionUs === "object")
13567
13708
  message.materialPositionUs = new $util.LongBits(object.materialPositionUs.low >>> 0, object.materialPositionUs.high >>> 0).toNumber();
13568
13709
  }
13710
+ if (object.userTimeUs != null) {
13711
+ if ($util.Long)
13712
+ (message.userTimeUs = $util.Long.fromValue(object.userTimeUs)).unsigned = false;
13713
+ else if (typeof object.userTimeUs === "string")
13714
+ message.userTimeUs = parseInt(object.userTimeUs, 10);
13715
+ else if (typeof object.userTimeUs === "number")
13716
+ message.userTimeUs = object.userTimeUs;
13717
+ else if (typeof object.userTimeUs === "object")
13718
+ message.userTimeUs = new $util.LongBits(object.userTimeUs.low >>> 0, object.userTimeUs.high >>> 0).toNumber();
13719
+ }
13720
+ if (object.speed != null)
13721
+ message.speed = Number(object.speed);
13569
13722
  if (object.userPlaylistId != null)
13570
13723
  message.userPlaylistId = String(object.userPlaylistId);
13571
13724
  if (object.playlistIndex != null)
@@ -13592,6 +13745,25 @@ var sesame = $root.sesame = (() => {
13592
13745
  else if (typeof object.clipPositionUs === "object")
13593
13746
  message.clipPositionUs = new $util.LongBits(object.clipPositionUs.low >>> 0, object.clipPositionUs.high >>> 0).toNumber();
13594
13747
  }
13748
+ if (object.clipDurationUs != null) {
13749
+ if ($util.Long)
13750
+ (message.clipDurationUs = $util.Long.fromValue(object.clipDurationUs)).unsigned = false;
13751
+ else if (typeof object.clipDurationUs === "string")
13752
+ message.clipDurationUs = parseInt(object.clipDurationUs, 10);
13753
+ else if (typeof object.clipDurationUs === "number")
13754
+ message.clipDurationUs = object.clipDurationUs;
13755
+ else if (typeof object.clipDurationUs === "object")
13756
+ message.clipDurationUs = new $util.LongBits(object.clipDurationUs.low >>> 0, object.clipDurationUs.high >>> 0).toNumber();
13757
+ }
13758
+ if (object.preroll != null)
13759
+ message.preroll = object.preroll >>> 0;
13760
+ if (object.postroll != null)
13761
+ message.postroll = object.postroll >>> 0;
13762
+ if (object.metadata != null) {
13763
+ if (typeof object.metadata !== "object")
13764
+ throw TypeError(".sesame.v1.status.TransportEvent.metadata: object expected");
13765
+ message.metadata = $root.sesame.v1.common.TransportMetadata.fromObject(object.metadata);
13766
+ }
13595
13767
  return message;
13596
13768
  };
13597
13769
  TransportEvent.toObject = function toObject(message, options) {
@@ -13601,6 +13773,7 @@ var sesame = $root.sesame = (() => {
13601
13773
  if (options.defaults) {
13602
13774
  object.sourceId = "";
13603
13775
  object.userId = "";
13776
+ object.uri = "";
13604
13777
  object.state = options.enums === String ? "SOURCE_TRANSPORT_STATE_STOPPED" : 0;
13605
13778
  if ($util.Long) {
13606
13779
  let long = new $util.Long(0, 0, false);
@@ -13617,6 +13790,12 @@ var sesame = $root.sesame = (() => {
13617
13790
  object.materialPositionUs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
13618
13791
  } else
13619
13792
  object.materialPositionUs = options.longs === String ? "0" : 0;
13793
+ if ($util.Long) {
13794
+ let long = new $util.Long(0, 0, false);
13795
+ object.userTimeUs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
13796
+ } else
13797
+ object.userTimeUs = options.longs === String ? "0" : 0;
13798
+ object.speed = 0;
13620
13799
  object.userPlaylistId = "";
13621
13800
  object.playlistIndex = 0;
13622
13801
  object.playlistLength = 0;
@@ -13630,11 +13809,21 @@ var sesame = $root.sesame = (() => {
13630
13809
  object.clipPositionUs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
13631
13810
  } else
13632
13811
  object.clipPositionUs = options.longs === String ? "0" : 0;
13812
+ if ($util.Long) {
13813
+ let long = new $util.Long(0, 0, false);
13814
+ object.clipDurationUs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
13815
+ } else
13816
+ object.clipDurationUs = options.longs === String ? "0" : 0;
13817
+ object.preroll = 0;
13818
+ object.postroll = 0;
13819
+ object.metadata = null;
13633
13820
  }
13634
13821
  if (message.sourceId != null && message.hasOwnProperty("sourceId"))
13635
13822
  object.sourceId = message.sourceId;
13636
13823
  if (message.userId != null && message.hasOwnProperty("userId"))
13637
13824
  object.userId = message.userId;
13825
+ if (message.uri != null && message.hasOwnProperty("uri"))
13826
+ object.uri = message.uri;
13638
13827
  if (message.state != null && message.hasOwnProperty("state"))
13639
13828
  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;
13640
13829
  if (message.durationUs != null && message.hasOwnProperty("durationUs"))
@@ -13652,6 +13841,13 @@ var sesame = $root.sesame = (() => {
13652
13841
  object.materialPositionUs = options.longs === String ? String(message.materialPositionUs) : message.materialPositionUs;
13653
13842
  else
13654
13843
  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;
13844
+ if (message.userTimeUs != null && message.hasOwnProperty("userTimeUs"))
13845
+ if (typeof message.userTimeUs === "number")
13846
+ object.userTimeUs = options.longs === String ? String(message.userTimeUs) : message.userTimeUs;
13847
+ else
13848
+ 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;
13849
+ if (message.speed != null && message.hasOwnProperty("speed"))
13850
+ object.speed = options.json && !isFinite(message.speed) ? String(message.speed) : message.speed;
13655
13851
  if (message.userPlaylistId != null && message.hasOwnProperty("userPlaylistId"))
13656
13852
  object.userPlaylistId = message.userPlaylistId;
13657
13853
  if (message.playlistIndex != null && message.hasOwnProperty("playlistIndex"))
@@ -13668,6 +13864,17 @@ var sesame = $root.sesame = (() => {
13668
13864
  object.clipPositionUs = options.longs === String ? String(message.clipPositionUs) : message.clipPositionUs;
13669
13865
  else
13670
13866
  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;
13867
+ if (message.clipDurationUs != null && message.hasOwnProperty("clipDurationUs"))
13868
+ if (typeof message.clipDurationUs === "number")
13869
+ object.clipDurationUs = options.longs === String ? String(message.clipDurationUs) : message.clipDurationUs;
13870
+ else
13871
+ 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;
13872
+ if (message.preroll != null && message.hasOwnProperty("preroll"))
13873
+ object.preroll = message.preroll;
13874
+ if (message.postroll != null && message.hasOwnProperty("postroll"))
13875
+ object.postroll = message.postroll;
13876
+ if (message.metadata != null && message.hasOwnProperty("metadata"))
13877
+ object.metadata = $root.sesame.v1.common.TransportMetadata.toObject(message.metadata, options);
13671
13878
  return object;
13672
13879
  };
13673
13880
  TransportEvent.prototype.toJSON = function toJSON() {
@@ -13692,12 +13899,11 @@ var sesame = $root.sesame = (() => {
13692
13899
  Event2.prototype.errorEvent = null;
13693
13900
  Event2.prototype.transportEvent = null;
13694
13901
  Event2.prototype.callbackEvent = null;
13695
- Event2.prototype.playlistExportEvent = null;
13696
- Event2.prototype.clipImportEvent = null;
13902
+ Event2.prototype.jobEvent = null;
13697
13903
  Event2.prototype.recorderEvent = null;
13698
13904
  let $oneOfFields;
13699
13905
  Object.defineProperty(Event2.prototype, "event", {
13700
- get: $util.oneOfGetter($oneOfFields = ["errorEvent", "transportEvent", "callbackEvent", "playlistExportEvent", "clipImportEvent", "recorderEvent"]),
13906
+ get: $util.oneOfGetter($oneOfFields = ["errorEvent", "transportEvent", "callbackEvent", "jobEvent", "recorderEvent"]),
13701
13907
  set: $util.oneOfSetter($oneOfFields)
13702
13908
  });
13703
13909
  Event2.create = function create(properties) {
@@ -13721,16 +13927,11 @@ var sesame = $root.sesame = (() => {
13721
13927
  /* id 3, wireType 2 =*/
13722
13928
  26
13723
13929
  ).fork()).ldelim();
13724
- if (message.playlistExportEvent != null && Object.hasOwnProperty.call(message, "playlistExportEvent"))
13725
- $root.sesame.v1.jobs.JobEvent.encode(message.playlistExportEvent, writer.uint32(
13930
+ if (message.jobEvent != null && Object.hasOwnProperty.call(message, "jobEvent"))
13931
+ $root.sesame.v1.jobs.Job.encode(message.jobEvent, writer.uint32(
13726
13932
  /* id 4, wireType 2 =*/
13727
13933
  34
13728
13934
  ).fork()).ldelim();
13729
- if (message.clipImportEvent != null && Object.hasOwnProperty.call(message, "clipImportEvent"))
13730
- $root.sesame.v1.jobs.JobEvent.encode(message.clipImportEvent, writer.uint32(
13731
- /* id 5, wireType 2 =*/
13732
- 42
13733
- ).fork()).ldelim();
13734
13935
  if (message.recorderEvent != null && Object.hasOwnProperty.call(message, "recorderEvent"))
13735
13936
  $root.sesame.v1.recorder.RecorderEvent.encode(message.recorderEvent, writer.uint32(
13736
13937
  /* id 6, wireType 2 =*/
@@ -13763,11 +13964,7 @@ var sesame = $root.sesame = (() => {
13763
13964
  break;
13764
13965
  }
13765
13966
  case 4: {
13766
- message.playlistExportEvent = $root.sesame.v1.jobs.JobEvent.decode(reader, reader.uint32());
13767
- break;
13768
- }
13769
- case 5: {
13770
- message.clipImportEvent = $root.sesame.v1.jobs.JobEvent.decode(reader, reader.uint32());
13967
+ message.jobEvent = $root.sesame.v1.jobs.Job.decode(reader, reader.uint32());
13771
13968
  break;
13772
13969
  }
13773
13970
  case 6: {
@@ -13818,24 +14015,14 @@ var sesame = $root.sesame = (() => {
13818
14015
  return "callbackEvent." + error;
13819
14016
  }
13820
14017
  }
13821
- if (message.playlistExportEvent != null && message.hasOwnProperty("playlistExportEvent")) {
13822
- if (properties.event === 1)
13823
- return "event: multiple values";
13824
- properties.event = 1;
13825
- {
13826
- let error = $root.sesame.v1.jobs.JobEvent.verify(message.playlistExportEvent);
13827
- if (error)
13828
- return "playlistExportEvent." + error;
13829
- }
13830
- }
13831
- if (message.clipImportEvent != null && message.hasOwnProperty("clipImportEvent")) {
14018
+ if (message.jobEvent != null && message.hasOwnProperty("jobEvent")) {
13832
14019
  if (properties.event === 1)
13833
14020
  return "event: multiple values";
13834
14021
  properties.event = 1;
13835
14022
  {
13836
- let error = $root.sesame.v1.jobs.JobEvent.verify(message.clipImportEvent);
14023
+ let error = $root.sesame.v1.jobs.Job.verify(message.jobEvent);
13837
14024
  if (error)
13838
- return "clipImportEvent." + error;
14025
+ return "jobEvent." + error;
13839
14026
  }
13840
14027
  }
13841
14028
  if (message.recorderEvent != null && message.hasOwnProperty("recorderEvent")) {
@@ -13869,15 +14056,10 @@ var sesame = $root.sesame = (() => {
13869
14056
  throw TypeError(".sesame.v1.status.Event.callbackEvent: object expected");
13870
14057
  message.callbackEvent = $root.sesame.v1.common.Callback.fromObject(object.callbackEvent);
13871
14058
  }
13872
- if (object.playlistExportEvent != null) {
13873
- if (typeof object.playlistExportEvent !== "object")
13874
- throw TypeError(".sesame.v1.status.Event.playlistExportEvent: object expected");
13875
- message.playlistExportEvent = $root.sesame.v1.jobs.JobEvent.fromObject(object.playlistExportEvent);
13876
- }
13877
- if (object.clipImportEvent != null) {
13878
- if (typeof object.clipImportEvent !== "object")
13879
- throw TypeError(".sesame.v1.status.Event.clipImportEvent: object expected");
13880
- message.clipImportEvent = $root.sesame.v1.jobs.JobEvent.fromObject(object.clipImportEvent);
14059
+ if (object.jobEvent != null) {
14060
+ if (typeof object.jobEvent !== "object")
14061
+ throw TypeError(".sesame.v1.status.Event.jobEvent: object expected");
14062
+ message.jobEvent = $root.sesame.v1.jobs.Job.fromObject(object.jobEvent);
13881
14063
  }
13882
14064
  if (object.recorderEvent != null) {
13883
14065
  if (typeof object.recorderEvent !== "object")
@@ -13905,15 +14087,10 @@ var sesame = $root.sesame = (() => {
13905
14087
  if (options.oneofs)
13906
14088
  object.event = "callbackEvent";
13907
14089
  }
13908
- if (message.playlistExportEvent != null && message.hasOwnProperty("playlistExportEvent")) {
13909
- object.playlistExportEvent = $root.sesame.v1.jobs.JobEvent.toObject(message.playlistExportEvent, options);
13910
- if (options.oneofs)
13911
- object.event = "playlistExportEvent";
13912
- }
13913
- if (message.clipImportEvent != null && message.hasOwnProperty("clipImportEvent")) {
13914
- object.clipImportEvent = $root.sesame.v1.jobs.JobEvent.toObject(message.clipImportEvent, options);
14090
+ if (message.jobEvent != null && message.hasOwnProperty("jobEvent")) {
14091
+ object.jobEvent = $root.sesame.v1.jobs.Job.toObject(message.jobEvent, options);
13915
14092
  if (options.oneofs)
13916
- object.event = "clipImportEvent";
14093
+ object.event = "jobEvent";
13917
14094
  }
13918
14095
  if (message.recorderEvent != null && message.hasOwnProperty("recorderEvent")) {
13919
14096
  object.recorderEvent = $root.sesame.v1.recorder.RecorderEvent.toObject(message.recorderEvent, options);
@@ -14024,7 +14201,6 @@ var sesame = $root.sesame = (() => {
14024
14201
  case 2:
14025
14202
  case 3:
14026
14203
  case 4:
14027
- case 5:
14028
14204
  case 6:
14029
14205
  break;
14030
14206
  }
@@ -14069,14 +14245,10 @@ var sesame = $root.sesame = (() => {
14069
14245
  case 3:
14070
14246
  message.eventTopics[i] = 3;
14071
14247
  break;
14072
- case "EVENT_TOPIC_PLAYLIST_EXPORT":
14248
+ case "EVENT_TOPIC_JOB":
14073
14249
  case 4:
14074
14250
  message.eventTopics[i] = 4;
14075
14251
  break;
14076
- case "EVENT_TOPIC_CLIP_IMPORT":
14077
- case 5:
14078
- message.eventTopics[i] = 5;
14079
- break;
14080
14252
  case "EVENT_TOPIC_RECORDER":
14081
14253
  case 6:
14082
14254
  message.eventTopics[i] = 6;
@@ -14162,7 +14334,7 @@ var sesame = $root.sesame = (() => {
14162
14334
  this[keys[i]] = properties[keys[i]];
14163
14335
  }
14164
14336
  }
14165
- EncoderConfig.prototype.codecId = 0;
14337
+ EncoderConfig.prototype.codec = 0;
14166
14338
  EncoderConfig.prototype.preset = 0;
14167
14339
  EncoderConfig.prototype.bitrateKbps = 0;
14168
14340
  EncoderConfig.prototype.keyframeInterval = 0;
@@ -14175,11 +14347,11 @@ var sesame = $root.sesame = (() => {
14175
14347
  EncoderConfig.encode = function encode(message, writer) {
14176
14348
  if (!writer)
14177
14349
  writer = $Writer.create();
14178
- if (message.codecId != null && Object.hasOwnProperty.call(message, "codecId"))
14350
+ if (message.codec != null && Object.hasOwnProperty.call(message, "codec"))
14179
14351
  writer.uint32(
14180
14352
  /* id 1, wireType 0 =*/
14181
14353
  8
14182
- ).int32(message.codecId);
14354
+ ).int32(message.codec);
14183
14355
  if (message.preset != null && Object.hasOwnProperty.call(message, "preset"))
14184
14356
  writer.uint32(
14185
14357
  /* id 2, wireType 0 =*/
@@ -14225,7 +14397,7 @@ var sesame = $root.sesame = (() => {
14225
14397
  break;
14226
14398
  switch (tag >>> 3) {
14227
14399
  case 1: {
14228
- message.codecId = reader.int32();
14400
+ message.codec = reader.int32();
14229
14401
  break;
14230
14402
  }
14231
14403
  case 2: {
@@ -14267,10 +14439,10 @@ var sesame = $root.sesame = (() => {
14267
14439
  EncoderConfig.verify = function verify(message) {
14268
14440
  if (typeof message !== "object" || message === null)
14269
14441
  return "object expected";
14270
- if (message.codecId != null && message.hasOwnProperty("codecId"))
14271
- switch (message.codecId) {
14442
+ if (message.codec != null && message.hasOwnProperty("codec"))
14443
+ switch (message.codec) {
14272
14444
  default:
14273
- return "codecId: enum value expected";
14445
+ return "codec: enum value expected";
14274
14446
  case 0:
14275
14447
  case 1:
14276
14448
  case 2:
@@ -14278,6 +14450,11 @@ var sesame = $root.sesame = (() => {
14278
14450
  case 4:
14279
14451
  case 5:
14280
14452
  case 6:
14453
+ case 7:
14454
+ case 64:
14455
+ case 65:
14456
+ case 66:
14457
+ case 67:
14281
14458
  break;
14282
14459
  }
14283
14460
  if (message.preset != null && message.hasOwnProperty("preset"))
@@ -14316,40 +14493,60 @@ var sesame = $root.sesame = (() => {
14316
14493
  if (object instanceof $root.sesame.v1.outputs.EncoderConfig)
14317
14494
  return object;
14318
14495
  let message = new $root.sesame.v1.outputs.EncoderConfig();
14319
- switch (object.codecId) {
14496
+ switch (object.codec) {
14320
14497
  default:
14321
- if (typeof object.codecId === "number") {
14322
- message.codecId = object.codecId;
14498
+ if (typeof object.codec === "number") {
14499
+ message.codec = object.codec;
14323
14500
  break;
14324
14501
  }
14325
14502
  break;
14326
- case "CODEC_ID_UNSPECIFIED":
14503
+ case "CODEC_TYPE_UNSPECIFIED":
14327
14504
  case 0:
14328
- message.codecId = 0;
14505
+ message.codec = 0;
14329
14506
  break;
14330
- case "CODEC_ID_H264":
14507
+ case "CODEC_TYPE_VIDEO_VP8":
14331
14508
  case 1:
14332
- message.codecId = 1;
14509
+ message.codec = 1;
14333
14510
  break;
14334
- case "CODEC_ID_HEVC":
14511
+ case "CODEC_TYPE_VIDEO_VP9":
14335
14512
  case 2:
14336
- message.codecId = 2;
14513
+ message.codec = 2;
14337
14514
  break;
14338
- case "CODEC_ID_AV1":
14515
+ case "CODEC_TYPE_VIDEO_AVC":
14339
14516
  case 3:
14340
- message.codecId = 3;
14517
+ message.codec = 3;
14341
14518
  break;
14342
- case "CODEC_ID_VP8":
14519
+ case "CODEC_TYPE_VIDEO_HEVC":
14343
14520
  case 4:
14344
- message.codecId = 4;
14521
+ message.codec = 4;
14345
14522
  break;
14346
- case "CODEC_ID_PRORES":
14523
+ case "CODEC_TYPE_VIDEO_AV1":
14347
14524
  case 5:
14348
- message.codecId = 5;
14525
+ message.codec = 5;
14349
14526
  break;
14350
- case "CODEC_ID_DNXHR":
14527
+ case "CODEC_TYPE_VIDEO_PRORES":
14351
14528
  case 6:
14352
- message.codecId = 6;
14529
+ message.codec = 6;
14530
+ break;
14531
+ case "CODEC_TYPE_VIDEO_DNXHR":
14532
+ case 7:
14533
+ message.codec = 7;
14534
+ break;
14535
+ case "CODEC_TYPE_AUDIO_OPUS":
14536
+ case 64:
14537
+ message.codec = 64;
14538
+ break;
14539
+ case "CODEC_TYPE_AUDIO_AAC":
14540
+ case 65:
14541
+ message.codec = 65;
14542
+ break;
14543
+ case "CODEC_TYPE_AUDIO_PCM":
14544
+ case 66:
14545
+ message.codec = 66;
14546
+ break;
14547
+ case "CODEC_TYPE_AUDIO_PCM_S24LE":
14548
+ case 67:
14549
+ message.codec = 67;
14353
14550
  break;
14354
14551
  }
14355
14552
  switch (object.preset) {
@@ -14393,7 +14590,7 @@ var sesame = $root.sesame = (() => {
14393
14590
  options = {};
14394
14591
  let object = {};
14395
14592
  if (options.defaults) {
14396
- object.codecId = options.enums === String ? "CODEC_ID_UNSPECIFIED" : 0;
14593
+ object.codec = options.enums === String ? "CODEC_TYPE_UNSPECIFIED" : 0;
14397
14594
  object.preset = options.enums === String ? "ENCODER_PRESET_UNSPECIFIED" : 0;
14398
14595
  object.bitrateKbps = 0;
14399
14596
  object.keyframeInterval = 0;
@@ -14401,8 +14598,8 @@ var sesame = $root.sesame = (() => {
14401
14598
  object.height = 0;
14402
14599
  object.fps = 0;
14403
14600
  }
14404
- if (message.codecId != null && message.hasOwnProperty("codecId"))
14405
- 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;
14601
+ if (message.codec != null && message.hasOwnProperty("codec"))
14602
+ 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;
14406
14603
  if (message.preset != null && message.hasOwnProperty("preset"))
14407
14604
  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;
14408
14605
  if (message.bitrateKbps != null && message.hasOwnProperty("bitrateKbps"))
@@ -17984,6 +18181,13 @@ var sesame = $root.sesame = (() => {
17984
18181
  }();
17985
18182
  v1.jobs = function() {
17986
18183
  const jobs = {};
18184
+ jobs.JobType = function() {
18185
+ const valuesById = {}, values = Object.create(valuesById);
18186
+ values[valuesById[0] = "JOB_TYPE_UNSPECIFIED"] = 0;
18187
+ values[valuesById[1] = "JOB_TYPE_EXPORT"] = 1;
18188
+ values[valuesById[2] = "JOB_TYPE_IMPORT"] = 2;
18189
+ return values;
18190
+ }();
17987
18191
  jobs.JobStatus = function() {
17988
18192
  const valuesById = {}, values = Object.create(valuesById);
17989
18193
  values[valuesById[0] = "JOB_STATUS_UNSPECIFIED"] = 0;
@@ -18003,15 +18207,6 @@ var sesame = $root.sesame = (() => {
18003
18207
  values[valuesById[4] = "CONTAINER_FORMAT_MXF"] = 4;
18004
18208
  return values;
18005
18209
  }();
18006
- jobs.AudioCodecId = function() {
18007
- const valuesById = {}, values = Object.create(valuesById);
18008
- values[valuesById[0] = "AUDIO_CODEC_ID_UNSPECIFIED"] = 0;
18009
- values[valuesById[1] = "AUDIO_CODEC_ID_AAC"] = 1;
18010
- values[valuesById[2] = "AUDIO_CODEC_ID_OPUS"] = 2;
18011
- values[valuesById[3] = "AUDIO_CODEC_ID_PCM_S16LE"] = 3;
18012
- values[valuesById[4] = "AUDIO_CODEC_ID_PCM_S24LE"] = 4;
18013
- return values;
18014
- }();
18015
18210
  jobs.RateControlMode = function() {
18016
18211
  const valuesById = {}, values = Object.create(valuesById);
18017
18212
  values[valuesById[0] = "RATE_CONTROL_MODE_UNSPECIFIED"] = 0;
@@ -18158,107 +18353,131 @@ var sesame = $root.sesame = (() => {
18158
18353
  };
18159
18354
  return TimingInfo;
18160
18355
  }();
18161
- jobs.JobStatusResponse = function() {
18162
- function JobStatusResponse(properties) {
18356
+ jobs.Job = function() {
18357
+ function Job(properties) {
18163
18358
  if (properties) {
18164
18359
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
18165
18360
  if (properties[keys[i]] != null)
18166
18361
  this[keys[i]] = properties[keys[i]];
18167
18362
  }
18168
18363
  }
18169
- JobStatusResponse.prototype.jobId = 0;
18170
- JobStatusResponse.prototype.name = "";
18171
- JobStatusResponse.prototype.description = "";
18172
- JobStatusResponse.prototype.status = 0;
18173
- JobStatusResponse.prototype.error = null;
18174
- JobStatusResponse.prototype.progress = 0;
18175
- JobStatusResponse.prototype.total = 0;
18364
+ Job.prototype.id = 0;
18365
+ Job.prototype.type = 0;
18366
+ Job.prototype.status = 0;
18367
+ Job.prototype.name = "";
18368
+ Job.prototype.description = "";
18369
+ Job.prototype.error = null;
18370
+ Job.prototype.progress = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
18371
+ Job.prototype.total = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
18372
+ Job.prototype.timingInfo = null;
18176
18373
  let $oneOfFields;
18177
- Object.defineProperty(JobStatusResponse.prototype, "_error", {
18374
+ Object.defineProperty(Job.prototype, "_error", {
18178
18375
  get: $util.oneOfGetter($oneOfFields = ["error"]),
18179
18376
  set: $util.oneOfSetter($oneOfFields)
18180
18377
  });
18181
- JobStatusResponse.create = function create(properties) {
18182
- return new JobStatusResponse(properties);
18378
+ Object.defineProperty(Job.prototype, "_timingInfo", {
18379
+ get: $util.oneOfGetter($oneOfFields = ["timingInfo"]),
18380
+ set: $util.oneOfSetter($oneOfFields)
18381
+ });
18382
+ Job.create = function create(properties) {
18383
+ return new Job(properties);
18183
18384
  };
18184
- JobStatusResponse.encode = function encode(message, writer) {
18385
+ Job.encode = function encode(message, writer) {
18185
18386
  if (!writer)
18186
18387
  writer = $Writer.create();
18187
- if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
18388
+ if (message.id != null && Object.hasOwnProperty.call(message, "id"))
18188
18389
  writer.uint32(
18189
18390
  /* id 1, wireType 0 =*/
18190
18391
  8
18191
- ).uint32(message.jobId);
18392
+ ).uint32(message.id);
18393
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
18394
+ writer.uint32(
18395
+ /* id 2, wireType 0 =*/
18396
+ 16
18397
+ ).int32(message.type);
18398
+ if (message.status != null && Object.hasOwnProperty.call(message, "status"))
18399
+ writer.uint32(
18400
+ /* id 3, wireType 0 =*/
18401
+ 24
18402
+ ).int32(message.status);
18192
18403
  if (message.name != null && Object.hasOwnProperty.call(message, "name"))
18193
18404
  writer.uint32(
18194
- /* id 2, wireType 2 =*/
18195
- 18
18405
+ /* id 4, wireType 2 =*/
18406
+ 34
18196
18407
  ).string(message.name);
18197
18408
  if (message.description != null && Object.hasOwnProperty.call(message, "description"))
18198
18409
  writer.uint32(
18199
- /* id 3, wireType 2 =*/
18200
- 26
18410
+ /* id 5, wireType 2 =*/
18411
+ 42
18201
18412
  ).string(message.description);
18202
- if (message.status != null && Object.hasOwnProperty.call(message, "status"))
18203
- writer.uint32(
18204
- /* id 4, wireType 0 =*/
18205
- 32
18206
- ).int32(message.status);
18207
18413
  if (message.error != null && Object.hasOwnProperty.call(message, "error"))
18208
18414
  writer.uint32(
18209
- /* id 5, wireType 2 =*/
18210
- 42
18415
+ /* id 6, wireType 2 =*/
18416
+ 50
18211
18417
  ).string(message.error);
18212
18418
  if (message.progress != null && Object.hasOwnProperty.call(message, "progress"))
18213
- writer.uint32(
18214
- /* id 6, wireType 0 =*/
18215
- 48
18216
- ).uint32(message.progress);
18217
- if (message.total != null && Object.hasOwnProperty.call(message, "total"))
18218
18419
  writer.uint32(
18219
18420
  /* id 7, wireType 0 =*/
18220
18421
  56
18221
- ).uint32(message.total);
18422
+ ).int64(message.progress);
18423
+ if (message.total != null && Object.hasOwnProperty.call(message, "total"))
18424
+ writer.uint32(
18425
+ /* id 8, wireType 0 =*/
18426
+ 64
18427
+ ).int64(message.total);
18428
+ if (message.timingInfo != null && Object.hasOwnProperty.call(message, "timingInfo"))
18429
+ $root.sesame.v1.jobs.TimingInfo.encode(message.timingInfo, writer.uint32(
18430
+ /* id 9, wireType 2 =*/
18431
+ 74
18432
+ ).fork()).ldelim();
18222
18433
  return writer;
18223
18434
  };
18224
- JobStatusResponse.encodeDelimited = function encodeDelimited(message, writer) {
18435
+ Job.encodeDelimited = function encodeDelimited(message, writer) {
18225
18436
  return this.encode(message, writer).ldelim();
18226
18437
  };
18227
- JobStatusResponse.decode = function decode(reader, length, error) {
18438
+ Job.decode = function decode(reader, length, error) {
18228
18439
  if (!(reader instanceof $Reader))
18229
18440
  reader = $Reader.create(reader);
18230
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobStatusResponse();
18441
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.Job();
18231
18442
  while (reader.pos < end) {
18232
18443
  let tag = reader.uint32();
18233
18444
  if (tag === error)
18234
18445
  break;
18235
18446
  switch (tag >>> 3) {
18236
18447
  case 1: {
18237
- message.jobId = reader.uint32();
18448
+ message.id = reader.uint32();
18238
18449
  break;
18239
18450
  }
18240
18451
  case 2: {
18241
- message.name = reader.string();
18452
+ message.type = reader.int32();
18242
18453
  break;
18243
18454
  }
18244
18455
  case 3: {
18245
- message.description = reader.string();
18456
+ message.status = reader.int32();
18246
18457
  break;
18247
18458
  }
18248
18459
  case 4: {
18249
- message.status = reader.int32();
18460
+ message.name = reader.string();
18250
18461
  break;
18251
18462
  }
18252
18463
  case 5: {
18253
- message.error = reader.string();
18464
+ message.description = reader.string();
18254
18465
  break;
18255
18466
  }
18256
18467
  case 6: {
18257
- message.progress = reader.uint32();
18468
+ message.error = reader.string();
18258
18469
  break;
18259
18470
  }
18260
18471
  case 7: {
18261
- message.total = reader.uint32();
18472
+ message.progress = reader.int64();
18473
+ break;
18474
+ }
18475
+ case 8: {
18476
+ message.total = reader.int64();
18477
+ break;
18478
+ }
18479
+ case 9: {
18480
+ message.timingInfo = $root.sesame.v1.jobs.TimingInfo.decode(reader, reader.uint32());
18262
18481
  break;
18263
18482
  }
18264
18483
  default:
@@ -18268,27 +18487,28 @@ var sesame = $root.sesame = (() => {
18268
18487
  }
18269
18488
  return message;
18270
18489
  };
18271
- JobStatusResponse.decodeDelimited = function decodeDelimited(reader) {
18490
+ Job.decodeDelimited = function decodeDelimited(reader) {
18272
18491
  if (!(reader instanceof $Reader))
18273
18492
  reader = new $Reader(reader);
18274
18493
  return this.decode(reader, reader.uint32());
18275
18494
  };
18276
- JobStatusResponse.verify = function verify(message) {
18495
+ Job.verify = function verify(message) {
18277
18496
  if (typeof message !== "object" || message === null)
18278
18497
  return "object expected";
18279
18498
  let properties = {};
18280
- if (message.jobId != null && message.hasOwnProperty("jobId")) {
18281
- if (!$util.isInteger(message.jobId))
18282
- return "jobId: integer expected";
18283
- }
18284
- if (message.name != null && message.hasOwnProperty("name")) {
18285
- if (!$util.isString(message.name))
18286
- return "name: string expected";
18287
- }
18288
- if (message.description != null && message.hasOwnProperty("description")) {
18289
- if (!$util.isString(message.description))
18290
- return "description: string expected";
18499
+ if (message.id != null && message.hasOwnProperty("id")) {
18500
+ if (!$util.isInteger(message.id))
18501
+ return "id: integer expected";
18291
18502
  }
18503
+ if (message.type != null && message.hasOwnProperty("type"))
18504
+ switch (message.type) {
18505
+ default:
18506
+ return "type: enum value expected";
18507
+ case 0:
18508
+ case 1:
18509
+ case 2:
18510
+ break;
18511
+ }
18292
18512
  if (message.status != null && message.hasOwnProperty("status"))
18293
18513
  switch (message.status) {
18294
18514
  default:
@@ -18301,31 +18521,63 @@ var sesame = $root.sesame = (() => {
18301
18521
  case 5:
18302
18522
  break;
18303
18523
  }
18524
+ if (message.name != null && message.hasOwnProperty("name")) {
18525
+ if (!$util.isString(message.name))
18526
+ return "name: string expected";
18527
+ }
18528
+ if (message.description != null && message.hasOwnProperty("description")) {
18529
+ if (!$util.isString(message.description))
18530
+ return "description: string expected";
18531
+ }
18304
18532
  if (message.error != null && message.hasOwnProperty("error")) {
18305
18533
  properties._error = 1;
18306
18534
  if (!$util.isString(message.error))
18307
18535
  return "error: string expected";
18308
18536
  }
18309
18537
  if (message.progress != null && message.hasOwnProperty("progress")) {
18310
- if (!$util.isInteger(message.progress))
18311
- return "progress: integer expected";
18538
+ if (!$util.isInteger(message.progress) && !(message.progress && $util.isInteger(message.progress.low) && $util.isInteger(message.progress.high)))
18539
+ return "progress: integer|Long expected";
18312
18540
  }
18313
18541
  if (message.total != null && message.hasOwnProperty("total")) {
18314
- if (!$util.isInteger(message.total))
18315
- return "total: integer expected";
18542
+ if (!$util.isInteger(message.total) && !(message.total && $util.isInteger(message.total.low) && $util.isInteger(message.total.high)))
18543
+ return "total: integer|Long expected";
18544
+ }
18545
+ if (message.timingInfo != null && message.hasOwnProperty("timingInfo")) {
18546
+ properties._timingInfo = 1;
18547
+ {
18548
+ let error = $root.sesame.v1.jobs.TimingInfo.verify(message.timingInfo);
18549
+ if (error)
18550
+ return "timingInfo." + error;
18551
+ }
18316
18552
  }
18317
18553
  return null;
18318
18554
  };
18319
- JobStatusResponse.fromObject = function fromObject(object) {
18320
- if (object instanceof $root.sesame.v1.jobs.JobStatusResponse)
18555
+ Job.fromObject = function fromObject(object) {
18556
+ if (object instanceof $root.sesame.v1.jobs.Job)
18321
18557
  return object;
18322
- let message = new $root.sesame.v1.jobs.JobStatusResponse();
18323
- if (object.jobId != null)
18324
- message.jobId = object.jobId >>> 0;
18325
- if (object.name != null)
18326
- message.name = String(object.name);
18327
- if (object.description != null)
18328
- message.description = String(object.description);
18558
+ let message = new $root.sesame.v1.jobs.Job();
18559
+ if (object.id != null)
18560
+ message.id = object.id >>> 0;
18561
+ switch (object.type) {
18562
+ default:
18563
+ if (typeof object.type === "number") {
18564
+ message.type = object.type;
18565
+ break;
18566
+ }
18567
+ break;
18568
+ case "JOB_TYPE_UNSPECIFIED":
18569
+ case 0:
18570
+ message.type = 0;
18571
+ break;
18572
+ case "JOB_TYPE_EXPORT":
18573
+ case 1:
18574
+ message.type = 1;
18575
+ break;
18576
+ case "JOB_TYPE_IMPORT":
18577
+ case 2:
18578
+ message.type = 2;
18579
+ break;
18580
+ }
18329
18581
  switch (object.status) {
18330
18582
  default:
18331
18583
  if (typeof object.status === "number") {
@@ -18358,58 +18610,105 @@ var sesame = $root.sesame = (() => {
18358
18610
  message.status = 5;
18359
18611
  break;
18360
18612
  }
18613
+ if (object.name != null)
18614
+ message.name = String(object.name);
18615
+ if (object.description != null)
18616
+ message.description = String(object.description);
18361
18617
  if (object.error != null)
18362
18618
  message.error = String(object.error);
18363
- if (object.progress != null)
18364
- message.progress = object.progress >>> 0;
18365
- if (object.total != null)
18366
- message.total = object.total >>> 0;
18619
+ if (object.progress != null) {
18620
+ if ($util.Long)
18621
+ (message.progress = $util.Long.fromValue(object.progress)).unsigned = false;
18622
+ else if (typeof object.progress === "string")
18623
+ message.progress = parseInt(object.progress, 10);
18624
+ else if (typeof object.progress === "number")
18625
+ message.progress = object.progress;
18626
+ else if (typeof object.progress === "object")
18627
+ message.progress = new $util.LongBits(object.progress.low >>> 0, object.progress.high >>> 0).toNumber();
18628
+ }
18629
+ if (object.total != null) {
18630
+ if ($util.Long)
18631
+ (message.total = $util.Long.fromValue(object.total)).unsigned = false;
18632
+ else if (typeof object.total === "string")
18633
+ message.total = parseInt(object.total, 10);
18634
+ else if (typeof object.total === "number")
18635
+ message.total = object.total;
18636
+ else if (typeof object.total === "object")
18637
+ message.total = new $util.LongBits(object.total.low >>> 0, object.total.high >>> 0).toNumber();
18638
+ }
18639
+ if (object.timingInfo != null) {
18640
+ if (typeof object.timingInfo !== "object")
18641
+ throw TypeError(".sesame.v1.jobs.Job.timingInfo: object expected");
18642
+ message.timingInfo = $root.sesame.v1.jobs.TimingInfo.fromObject(object.timingInfo);
18643
+ }
18367
18644
  return message;
18368
18645
  };
18369
- JobStatusResponse.toObject = function toObject(message, options) {
18646
+ Job.toObject = function toObject(message, options) {
18370
18647
  if (!options)
18371
18648
  options = {};
18372
18649
  let object = {};
18373
18650
  if (options.defaults) {
18374
- object.jobId = 0;
18651
+ object.id = 0;
18652
+ object.type = options.enums === String ? "JOB_TYPE_UNSPECIFIED" : 0;
18653
+ object.status = options.enums === String ? "JOB_STATUS_UNSPECIFIED" : 0;
18375
18654
  object.name = "";
18376
18655
  object.description = "";
18377
- object.status = options.enums === String ? "JOB_STATUS_UNSPECIFIED" : 0;
18378
- object.progress = 0;
18379
- object.total = 0;
18656
+ if ($util.Long) {
18657
+ let long = new $util.Long(0, 0, false);
18658
+ object.progress = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
18659
+ } else
18660
+ object.progress = options.longs === String ? "0" : 0;
18661
+ if ($util.Long) {
18662
+ let long = new $util.Long(0, 0, false);
18663
+ object.total = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
18664
+ } else
18665
+ object.total = options.longs === String ? "0" : 0;
18380
18666
  }
18381
- if (message.jobId != null && message.hasOwnProperty("jobId"))
18382
- object.jobId = message.jobId;
18667
+ if (message.id != null && message.hasOwnProperty("id"))
18668
+ object.id = message.id;
18669
+ if (message.type != null && message.hasOwnProperty("type"))
18670
+ 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;
18671
+ if (message.status != null && message.hasOwnProperty("status"))
18672
+ 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;
18383
18673
  if (message.name != null && message.hasOwnProperty("name"))
18384
18674
  object.name = message.name;
18385
18675
  if (message.description != null && message.hasOwnProperty("description"))
18386
18676
  object.description = message.description;
18387
- if (message.status != null && message.hasOwnProperty("status"))
18388
- 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;
18389
18677
  if (message.error != null && message.hasOwnProperty("error")) {
18390
18678
  object.error = message.error;
18391
18679
  if (options.oneofs)
18392
18680
  object._error = "error";
18393
18681
  }
18394
18682
  if (message.progress != null && message.hasOwnProperty("progress"))
18395
- object.progress = message.progress;
18683
+ if (typeof message.progress === "number")
18684
+ object.progress = options.longs === String ? String(message.progress) : message.progress;
18685
+ else
18686
+ 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;
18396
18687
  if (message.total != null && message.hasOwnProperty("total"))
18397
- object.total = message.total;
18688
+ if (typeof message.total === "number")
18689
+ object.total = options.longs === String ? String(message.total) : message.total;
18690
+ else
18691
+ 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;
18692
+ if (message.timingInfo != null && message.hasOwnProperty("timingInfo")) {
18693
+ object.timingInfo = $root.sesame.v1.jobs.TimingInfo.toObject(message.timingInfo, options);
18694
+ if (options.oneofs)
18695
+ object._timingInfo = "timingInfo";
18696
+ }
18398
18697
  return object;
18399
18698
  };
18400
- JobStatusResponse.prototype.toJSON = function toJSON() {
18699
+ Job.prototype.toJSON = function toJSON() {
18401
18700
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
18402
18701
  };
18403
- JobStatusResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
18702
+ Job.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
18404
18703
  if (typeUrlPrefix === void 0) {
18405
18704
  typeUrlPrefix = "type.googleapis.com";
18406
18705
  }
18407
- return typeUrlPrefix + "/sesame.v1.jobs.JobStatusResponse";
18706
+ return typeUrlPrefix + "/sesame.v1.jobs.Job";
18408
18707
  };
18409
- return JobStatusResponse;
18708
+ return Job;
18410
18709
  }();
18411
- jobs.JobListResponse = function() {
18412
- function JobListResponse(properties) {
18710
+ jobs.JobList = function() {
18711
+ function JobList(properties) {
18413
18712
  this.jobs = [];
18414
18713
  if (properties) {
18415
18714
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
@@ -18417,28 +18716,28 @@ var sesame = $root.sesame = (() => {
18417
18716
  this[keys[i]] = properties[keys[i]];
18418
18717
  }
18419
18718
  }
18420
- JobListResponse.prototype.jobs = $util.emptyArray;
18421
- JobListResponse.create = function create(properties) {
18422
- return new JobListResponse(properties);
18719
+ JobList.prototype.jobs = $util.emptyArray;
18720
+ JobList.create = function create(properties) {
18721
+ return new JobList(properties);
18423
18722
  };
18424
- JobListResponse.encode = function encode(message, writer) {
18723
+ JobList.encode = function encode(message, writer) {
18425
18724
  if (!writer)
18426
18725
  writer = $Writer.create();
18427
18726
  if (message.jobs != null && message.jobs.length)
18428
18727
  for (let i = 0; i < message.jobs.length; ++i)
18429
- $root.sesame.v1.jobs.JobStatusResponse.encode(message.jobs[i], writer.uint32(
18728
+ $root.sesame.v1.jobs.Job.encode(message.jobs[i], writer.uint32(
18430
18729
  /* id 1, wireType 2 =*/
18431
18730
  10
18432
18731
  ).fork()).ldelim();
18433
18732
  return writer;
18434
18733
  };
18435
- JobListResponse.encodeDelimited = function encodeDelimited(message, writer) {
18734
+ JobList.encodeDelimited = function encodeDelimited(message, writer) {
18436
18735
  return this.encode(message, writer).ldelim();
18437
18736
  };
18438
- JobListResponse.decode = function decode(reader, length, error) {
18737
+ JobList.decode = function decode(reader, length, error) {
18439
18738
  if (!(reader instanceof $Reader))
18440
18739
  reader = $Reader.create(reader);
18441
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobListResponse();
18740
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobList();
18442
18741
  while (reader.pos < end) {
18443
18742
  let tag = reader.uint32();
18444
18743
  if (tag === error)
@@ -18447,7 +18746,7 @@ var sesame = $root.sesame = (() => {
18447
18746
  case 1: {
18448
18747
  if (!(message.jobs && message.jobs.length))
18449
18748
  message.jobs = [];
18450
- message.jobs.push($root.sesame.v1.jobs.JobStatusResponse.decode(reader, reader.uint32()));
18749
+ message.jobs.push($root.sesame.v1.jobs.Job.decode(reader, reader.uint32()));
18451
18750
  break;
18452
18751
  }
18453
18752
  default:
@@ -18457,42 +18756,42 @@ var sesame = $root.sesame = (() => {
18457
18756
  }
18458
18757
  return message;
18459
18758
  };
18460
- JobListResponse.decodeDelimited = function decodeDelimited(reader) {
18759
+ JobList.decodeDelimited = function decodeDelimited(reader) {
18461
18760
  if (!(reader instanceof $Reader))
18462
18761
  reader = new $Reader(reader);
18463
18762
  return this.decode(reader, reader.uint32());
18464
18763
  };
18465
- JobListResponse.verify = function verify(message) {
18764
+ JobList.verify = function verify(message) {
18466
18765
  if (typeof message !== "object" || message === null)
18467
18766
  return "object expected";
18468
18767
  if (message.jobs != null && message.hasOwnProperty("jobs")) {
18469
18768
  if (!Array.isArray(message.jobs))
18470
18769
  return "jobs: array expected";
18471
18770
  for (let i = 0; i < message.jobs.length; ++i) {
18472
- let error = $root.sesame.v1.jobs.JobStatusResponse.verify(message.jobs[i]);
18771
+ let error = $root.sesame.v1.jobs.Job.verify(message.jobs[i]);
18473
18772
  if (error)
18474
18773
  return "jobs." + error;
18475
18774
  }
18476
18775
  }
18477
18776
  return null;
18478
18777
  };
18479
- JobListResponse.fromObject = function fromObject(object) {
18480
- if (object instanceof $root.sesame.v1.jobs.JobListResponse)
18778
+ JobList.fromObject = function fromObject(object) {
18779
+ if (object instanceof $root.sesame.v1.jobs.JobList)
18481
18780
  return object;
18482
- let message = new $root.sesame.v1.jobs.JobListResponse();
18781
+ let message = new $root.sesame.v1.jobs.JobList();
18483
18782
  if (object.jobs) {
18484
18783
  if (!Array.isArray(object.jobs))
18485
- throw TypeError(".sesame.v1.jobs.JobListResponse.jobs: array expected");
18784
+ throw TypeError(".sesame.v1.jobs.JobList.jobs: array expected");
18486
18785
  message.jobs = [];
18487
18786
  for (let i = 0; i < object.jobs.length; ++i) {
18488
18787
  if (typeof object.jobs[i] !== "object")
18489
- throw TypeError(".sesame.v1.jobs.JobListResponse.jobs: object expected");
18490
- message.jobs[i] = $root.sesame.v1.jobs.JobStatusResponse.fromObject(object.jobs[i]);
18788
+ throw TypeError(".sesame.v1.jobs.JobList.jobs: object expected");
18789
+ message.jobs[i] = $root.sesame.v1.jobs.Job.fromObject(object.jobs[i]);
18491
18790
  }
18492
18791
  }
18493
18792
  return message;
18494
18793
  };
18495
- JobListResponse.toObject = function toObject(message, options) {
18794
+ JobList.toObject = function toObject(message, options) {
18496
18795
  if (!options)
18497
18796
  options = {};
18498
18797
  let object = {};
@@ -18501,116 +18800,72 @@ var sesame = $root.sesame = (() => {
18501
18800
  if (message.jobs && message.jobs.length) {
18502
18801
  object.jobs = [];
18503
18802
  for (let j = 0; j < message.jobs.length; ++j)
18504
- object.jobs[j] = $root.sesame.v1.jobs.JobStatusResponse.toObject(message.jobs[j], options);
18803
+ object.jobs[j] = $root.sesame.v1.jobs.Job.toObject(message.jobs[j], options);
18505
18804
  }
18506
18805
  return object;
18507
18806
  };
18508
- JobListResponse.prototype.toJSON = function toJSON() {
18807
+ JobList.prototype.toJSON = function toJSON() {
18509
18808
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
18510
18809
  };
18511
- JobListResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
18810
+ JobList.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
18512
18811
  if (typeUrlPrefix === void 0) {
18513
18812
  typeUrlPrefix = "type.googleapis.com";
18514
18813
  }
18515
- return typeUrlPrefix + "/sesame.v1.jobs.JobListResponse";
18814
+ return typeUrlPrefix + "/sesame.v1.jobs.JobList";
18516
18815
  };
18517
- return JobListResponse;
18816
+ return JobList;
18518
18817
  }();
18519
- jobs.JobEvent = function() {
18520
- function JobEvent(properties) {
18818
+ jobs.JobStartRequest = function() {
18819
+ function JobStartRequest(properties) {
18521
18820
  if (properties) {
18522
18821
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
18523
18822
  if (properties[keys[i]] != null)
18524
18823
  this[keys[i]] = properties[keys[i]];
18525
18824
  }
18526
18825
  }
18527
- JobEvent.prototype.jobId = 0;
18528
- JobEvent.prototype.source = "";
18529
- JobEvent.prototype.status = 0;
18530
- JobEvent.prototype.statusText = "";
18531
- JobEvent.prototype.error = null;
18532
- JobEvent.prototype.timingInfo = null;
18826
+ JobStartRequest.prototype.exportRequest = null;
18827
+ JobStartRequest.prototype.importRequest = null;
18533
18828
  let $oneOfFields;
18534
- Object.defineProperty(JobEvent.prototype, "_error", {
18535
- get: $util.oneOfGetter($oneOfFields = ["error"]),
18536
- set: $util.oneOfSetter($oneOfFields)
18537
- });
18538
- Object.defineProperty(JobEvent.prototype, "_timingInfo", {
18539
- get: $util.oneOfGetter($oneOfFields = ["timingInfo"]),
18829
+ Object.defineProperty(JobStartRequest.prototype, "config", {
18830
+ get: $util.oneOfGetter($oneOfFields = ["exportRequest", "importRequest"]),
18540
18831
  set: $util.oneOfSetter($oneOfFields)
18541
18832
  });
18542
- JobEvent.create = function create(properties) {
18543
- return new JobEvent(properties);
18833
+ JobStartRequest.create = function create(properties) {
18834
+ return new JobStartRequest(properties);
18544
18835
  };
18545
- JobEvent.encode = function encode(message, writer) {
18836
+ JobStartRequest.encode = function encode(message, writer) {
18546
18837
  if (!writer)
18547
18838
  writer = $Writer.create();
18548
- if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
18549
- writer.uint32(
18550
- /* id 1, wireType 0 =*/
18551
- 8
18552
- ).uint32(message.jobId);
18553
- if (message.source != null && Object.hasOwnProperty.call(message, "source"))
18554
- writer.uint32(
18839
+ if (message.exportRequest != null && Object.hasOwnProperty.call(message, "exportRequest"))
18840
+ $root.sesame.v1.jobs.ExportStartRequest.encode(message.exportRequest, writer.uint32(
18841
+ /* id 1, wireType 2 =*/
18842
+ 10
18843
+ ).fork()).ldelim();
18844
+ if (message.importRequest != null && Object.hasOwnProperty.call(message, "importRequest"))
18845
+ $root.sesame.v1.jobs.ImportStartRequest.encode(message.importRequest, writer.uint32(
18555
18846
  /* id 2, wireType 2 =*/
18556
18847
  18
18557
- ).string(message.source);
18558
- if (message.status != null && Object.hasOwnProperty.call(message, "status"))
18559
- writer.uint32(
18560
- /* id 3, wireType 0 =*/
18561
- 24
18562
- ).int32(message.status);
18563
- if (message.statusText != null && Object.hasOwnProperty.call(message, "statusText"))
18564
- writer.uint32(
18565
- /* id 4, wireType 2 =*/
18566
- 34
18567
- ).string(message.statusText);
18568
- if (message.error != null && Object.hasOwnProperty.call(message, "error"))
18569
- writer.uint32(
18570
- /* id 5, wireType 2 =*/
18571
- 42
18572
- ).string(message.error);
18573
- if (message.timingInfo != null && Object.hasOwnProperty.call(message, "timingInfo"))
18574
- $root.sesame.v1.jobs.TimingInfo.encode(message.timingInfo, writer.uint32(
18575
- /* id 6, wireType 2 =*/
18576
- 50
18577
18848
  ).fork()).ldelim();
18578
18849
  return writer;
18579
18850
  };
18580
- JobEvent.encodeDelimited = function encodeDelimited(message, writer) {
18851
+ JobStartRequest.encodeDelimited = function encodeDelimited(message, writer) {
18581
18852
  return this.encode(message, writer).ldelim();
18582
18853
  };
18583
- JobEvent.decode = function decode(reader, length, error) {
18854
+ JobStartRequest.decode = function decode(reader, length, error) {
18584
18855
  if (!(reader instanceof $Reader))
18585
18856
  reader = $Reader.create(reader);
18586
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobEvent();
18857
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobStartRequest();
18587
18858
  while (reader.pos < end) {
18588
18859
  let tag = reader.uint32();
18589
18860
  if (tag === error)
18590
18861
  break;
18591
18862
  switch (tag >>> 3) {
18592
18863
  case 1: {
18593
- message.jobId = reader.uint32();
18864
+ message.exportRequest = $root.sesame.v1.jobs.ExportStartRequest.decode(reader, reader.uint32());
18594
18865
  break;
18595
18866
  }
18596
18867
  case 2: {
18597
- message.source = reader.string();
18598
- break;
18599
- }
18600
- case 3: {
18601
- message.status = reader.int32();
18602
- break;
18603
- }
18604
- case 4: {
18605
- message.statusText = reader.string();
18606
- break;
18607
- }
18608
- case 5: {
18609
- message.error = reader.string();
18610
- break;
18611
- }
18612
- case 6: {
18613
- message.timingInfo = $root.sesame.v1.jobs.TimingInfo.decode(reader, reader.uint32());
18868
+ message.importRequest = $root.sesame.v1.jobs.ImportStartRequest.decode(reader, reader.uint32());
18614
18869
  break;
18615
18870
  }
18616
18871
  default:
@@ -18620,174 +18875,346 @@ var sesame = $root.sesame = (() => {
18620
18875
  }
18621
18876
  return message;
18622
18877
  };
18623
- JobEvent.decodeDelimited = function decodeDelimited(reader) {
18878
+ JobStartRequest.decodeDelimited = function decodeDelimited(reader) {
18624
18879
  if (!(reader instanceof $Reader))
18625
18880
  reader = new $Reader(reader);
18626
18881
  return this.decode(reader, reader.uint32());
18627
18882
  };
18628
- JobEvent.verify = function verify(message) {
18883
+ JobStartRequest.verify = function verify(message) {
18629
18884
  if (typeof message !== "object" || message === null)
18630
18885
  return "object expected";
18631
18886
  let properties = {};
18632
- if (message.jobId != null && message.hasOwnProperty("jobId")) {
18633
- if (!$util.isInteger(message.jobId))
18634
- return "jobId: integer expected";
18635
- }
18636
- if (message.source != null && message.hasOwnProperty("source")) {
18637
- if (!$util.isString(message.source))
18638
- return "source: string expected";
18639
- }
18640
- if (message.status != null && message.hasOwnProperty("status"))
18641
- switch (message.status) {
18642
- default:
18643
- return "status: enum value expected";
18644
- case 0:
18645
- case 1:
18646
- case 2:
18647
- case 3:
18648
- case 4:
18649
- case 5:
18650
- break;
18887
+ if (message.exportRequest != null && message.hasOwnProperty("exportRequest")) {
18888
+ properties.config = 1;
18889
+ {
18890
+ let error = $root.sesame.v1.jobs.ExportStartRequest.verify(message.exportRequest);
18891
+ if (error)
18892
+ return "exportRequest." + error;
18651
18893
  }
18652
- if (message.statusText != null && message.hasOwnProperty("statusText")) {
18653
- if (!$util.isString(message.statusText))
18654
- return "statusText: string expected";
18655
- }
18656
- if (message.error != null && message.hasOwnProperty("error")) {
18657
- properties._error = 1;
18658
- if (!$util.isString(message.error))
18659
- return "error: string expected";
18660
18894
  }
18661
- if (message.timingInfo != null && message.hasOwnProperty("timingInfo")) {
18662
- properties._timingInfo = 1;
18895
+ if (message.importRequest != null && message.hasOwnProperty("importRequest")) {
18896
+ if (properties.config === 1)
18897
+ return "config: multiple values";
18898
+ properties.config = 1;
18663
18899
  {
18664
- let error = $root.sesame.v1.jobs.TimingInfo.verify(message.timingInfo);
18900
+ let error = $root.sesame.v1.jobs.ImportStartRequest.verify(message.importRequest);
18665
18901
  if (error)
18666
- return "timingInfo." + error;
18902
+ return "importRequest." + error;
18667
18903
  }
18668
18904
  }
18669
18905
  return null;
18670
18906
  };
18671
- JobEvent.fromObject = function fromObject(object) {
18672
- if (object instanceof $root.sesame.v1.jobs.JobEvent)
18907
+ JobStartRequest.fromObject = function fromObject(object) {
18908
+ if (object instanceof $root.sesame.v1.jobs.JobStartRequest)
18673
18909
  return object;
18674
- let message = new $root.sesame.v1.jobs.JobEvent();
18675
- if (object.jobId != null)
18676
- message.jobId = object.jobId >>> 0;
18677
- if (object.source != null)
18678
- message.source = String(object.source);
18679
- switch (object.status) {
18680
- default:
18681
- if (typeof object.status === "number") {
18682
- message.status = object.status;
18683
- break;
18684
- }
18685
- break;
18686
- case "JOB_STATUS_UNSPECIFIED":
18687
- case 0:
18688
- message.status = 0;
18689
- break;
18690
- case "JOB_STATUS_PENDING":
18691
- case 1:
18692
- message.status = 1;
18693
- break;
18694
- case "JOB_STATUS_IN_PROGRESS":
18695
- case 2:
18696
- message.status = 2;
18697
- break;
18698
- case "JOB_STATUS_COMPLETE":
18699
- case 3:
18700
- message.status = 3;
18701
- break;
18702
- case "JOB_STATUS_ABORTED":
18703
- case 4:
18704
- message.status = 4;
18705
- break;
18706
- case "JOB_STATUS_ERROR":
18707
- case 5:
18708
- message.status = 5;
18709
- break;
18910
+ let message = new $root.sesame.v1.jobs.JobStartRequest();
18911
+ if (object.exportRequest != null) {
18912
+ if (typeof object.exportRequest !== "object")
18913
+ throw TypeError(".sesame.v1.jobs.JobStartRequest.exportRequest: object expected");
18914
+ message.exportRequest = $root.sesame.v1.jobs.ExportStartRequest.fromObject(object.exportRequest);
18710
18915
  }
18711
- if (object.statusText != null)
18712
- message.statusText = String(object.statusText);
18713
- if (object.error != null)
18714
- message.error = String(object.error);
18715
- if (object.timingInfo != null) {
18716
- if (typeof object.timingInfo !== "object")
18717
- throw TypeError(".sesame.v1.jobs.JobEvent.timingInfo: object expected");
18718
- message.timingInfo = $root.sesame.v1.jobs.TimingInfo.fromObject(object.timingInfo);
18916
+ if (object.importRequest != null) {
18917
+ if (typeof object.importRequest !== "object")
18918
+ throw TypeError(".sesame.v1.jobs.JobStartRequest.importRequest: object expected");
18919
+ message.importRequest = $root.sesame.v1.jobs.ImportStartRequest.fromObject(object.importRequest);
18719
18920
  }
18720
18921
  return message;
18721
18922
  };
18722
- JobEvent.toObject = function toObject(message, options) {
18923
+ JobStartRequest.toObject = function toObject(message, options) {
18723
18924
  if (!options)
18724
18925
  options = {};
18725
18926
  let object = {};
18726
- if (options.defaults) {
18727
- object.jobId = 0;
18728
- object.source = "";
18729
- object.status = options.enums === String ? "JOB_STATUS_UNSPECIFIED" : 0;
18730
- object.statusText = "";
18731
- }
18732
- if (message.jobId != null && message.hasOwnProperty("jobId"))
18733
- object.jobId = message.jobId;
18734
- if (message.source != null && message.hasOwnProperty("source"))
18735
- object.source = message.source;
18736
- if (message.status != null && message.hasOwnProperty("status"))
18737
- 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;
18738
- if (message.statusText != null && message.hasOwnProperty("statusText"))
18739
- object.statusText = message.statusText;
18740
- if (message.error != null && message.hasOwnProperty("error")) {
18741
- object.error = message.error;
18927
+ if (message.exportRequest != null && message.hasOwnProperty("exportRequest")) {
18928
+ object.exportRequest = $root.sesame.v1.jobs.ExportStartRequest.toObject(message.exportRequest, options);
18742
18929
  if (options.oneofs)
18743
- object._error = "error";
18930
+ object.config = "exportRequest";
18744
18931
  }
18745
- if (message.timingInfo != null && message.hasOwnProperty("timingInfo")) {
18746
- object.timingInfo = $root.sesame.v1.jobs.TimingInfo.toObject(message.timingInfo, options);
18932
+ if (message.importRequest != null && message.hasOwnProperty("importRequest")) {
18933
+ object.importRequest = $root.sesame.v1.jobs.ImportStartRequest.toObject(message.importRequest, options);
18747
18934
  if (options.oneofs)
18748
- object._timingInfo = "timingInfo";
18935
+ object.config = "importRequest";
18749
18936
  }
18750
18937
  return object;
18751
18938
  };
18752
- JobEvent.prototype.toJSON = function toJSON() {
18939
+ JobStartRequest.prototype.toJSON = function toJSON() {
18753
18940
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
18754
18941
  };
18755
- JobEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
18942
+ JobStartRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
18756
18943
  if (typeUrlPrefix === void 0) {
18757
18944
  typeUrlPrefix = "type.googleapis.com";
18758
18945
  }
18759
- return typeUrlPrefix + "/sesame.v1.jobs.JobEvent";
18946
+ return typeUrlPrefix + "/sesame.v1.jobs.JobStartRequest";
18760
18947
  };
18761
- return JobEvent;
18948
+ return JobStartRequest;
18762
18949
  }();
18763
- jobs.ExportConfiguration = function() {
18764
- function ExportConfiguration(properties) {
18765
- this.audioRouting = [];
18950
+ jobs.JobAbortRequest = function() {
18951
+ function JobAbortRequest(properties) {
18766
18952
  if (properties) {
18767
18953
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
18768
18954
  if (properties[keys[i]] != null)
18769
18955
  this[keys[i]] = properties[keys[i]];
18770
18956
  }
18771
18957
  }
18772
- ExportConfiguration.prototype.filename = "";
18773
- ExportConfiguration.prototype.container = 0;
18774
- ExportConfiguration.prototype.videoCodec = 0;
18775
- ExportConfiguration.prototype.width = 0;
18776
- ExportConfiguration.prototype.height = 0;
18777
- ExportConfiguration.prototype.fpsNum = 0;
18778
- ExportConfiguration.prototype.fpsDen = 0;
18779
- ExportConfiguration.prototype.rateControl = 0;
18780
- ExportConfiguration.prototype.videoBitrateKbps = 0;
18781
- ExportConfiguration.prototype.maxVideoBitrateKbps = 0;
18782
- ExportConfiguration.prototype.gopSize = 0;
18783
- ExportConfiguration.prototype.maxBFrames = 0;
18784
- ExportConfiguration.prototype.profile = "";
18785
- ExportConfiguration.prototype.level = "";
18786
- ExportConfiguration.prototype.pixelFormat = "";
18787
- ExportConfiguration.prototype.colorPrimaries = "";
18788
- ExportConfiguration.prototype.colorTransfer = "";
18789
- ExportConfiguration.prototype.colorMatrix = "";
18790
- ExportConfiguration.prototype.fullRange = false;
18958
+ JobAbortRequest.prototype.jobId = 0;
18959
+ JobAbortRequest.create = function create(properties) {
18960
+ return new JobAbortRequest(properties);
18961
+ };
18962
+ JobAbortRequest.encode = function encode(message, writer) {
18963
+ if (!writer)
18964
+ writer = $Writer.create();
18965
+ if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
18966
+ writer.uint32(
18967
+ /* id 1, wireType 0 =*/
18968
+ 8
18969
+ ).uint32(message.jobId);
18970
+ return writer;
18971
+ };
18972
+ JobAbortRequest.encodeDelimited = function encodeDelimited(message, writer) {
18973
+ return this.encode(message, writer).ldelim();
18974
+ };
18975
+ JobAbortRequest.decode = function decode(reader, length, error) {
18976
+ if (!(reader instanceof $Reader))
18977
+ reader = $Reader.create(reader);
18978
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobAbortRequest();
18979
+ while (reader.pos < end) {
18980
+ let tag = reader.uint32();
18981
+ if (tag === error)
18982
+ break;
18983
+ switch (tag >>> 3) {
18984
+ case 1: {
18985
+ message.jobId = reader.uint32();
18986
+ break;
18987
+ }
18988
+ default:
18989
+ reader.skipType(tag & 7);
18990
+ break;
18991
+ }
18992
+ }
18993
+ return message;
18994
+ };
18995
+ JobAbortRequest.decodeDelimited = function decodeDelimited(reader) {
18996
+ if (!(reader instanceof $Reader))
18997
+ reader = new $Reader(reader);
18998
+ return this.decode(reader, reader.uint32());
18999
+ };
19000
+ JobAbortRequest.verify = function verify(message) {
19001
+ if (typeof message !== "object" || message === null)
19002
+ return "object expected";
19003
+ if (message.jobId != null && message.hasOwnProperty("jobId")) {
19004
+ if (!$util.isInteger(message.jobId))
19005
+ return "jobId: integer expected";
19006
+ }
19007
+ return null;
19008
+ };
19009
+ JobAbortRequest.fromObject = function fromObject(object) {
19010
+ if (object instanceof $root.sesame.v1.jobs.JobAbortRequest)
19011
+ return object;
19012
+ let message = new $root.sesame.v1.jobs.JobAbortRequest();
19013
+ if (object.jobId != null)
19014
+ message.jobId = object.jobId >>> 0;
19015
+ return message;
19016
+ };
19017
+ JobAbortRequest.toObject = function toObject(message, options) {
19018
+ if (!options)
19019
+ options = {};
19020
+ let object = {};
19021
+ if (options.defaults)
19022
+ object.jobId = 0;
19023
+ if (message.jobId != null && message.hasOwnProperty("jobId"))
19024
+ object.jobId = message.jobId;
19025
+ return object;
19026
+ };
19027
+ JobAbortRequest.prototype.toJSON = function toJSON() {
19028
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
19029
+ };
19030
+ JobAbortRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
19031
+ if (typeUrlPrefix === void 0) {
19032
+ typeUrlPrefix = "type.googleapis.com";
19033
+ }
19034
+ return typeUrlPrefix + "/sesame.v1.jobs.JobAbortRequest";
19035
+ };
19036
+ return JobAbortRequest;
19037
+ }();
19038
+ jobs.JobStatusRequest = function() {
19039
+ function JobStatusRequest(properties) {
19040
+ if (properties) {
19041
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
19042
+ if (properties[keys[i]] != null)
19043
+ this[keys[i]] = properties[keys[i]];
19044
+ }
19045
+ }
19046
+ JobStatusRequest.prototype.jobId = 0;
19047
+ JobStatusRequest.create = function create(properties) {
19048
+ return new JobStatusRequest(properties);
19049
+ };
19050
+ JobStatusRequest.encode = function encode(message, writer) {
19051
+ if (!writer)
19052
+ writer = $Writer.create();
19053
+ if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
19054
+ writer.uint32(
19055
+ /* id 1, wireType 0 =*/
19056
+ 8
19057
+ ).uint32(message.jobId);
19058
+ return writer;
19059
+ };
19060
+ JobStatusRequest.encodeDelimited = function encodeDelimited(message, writer) {
19061
+ return this.encode(message, writer).ldelim();
19062
+ };
19063
+ JobStatusRequest.decode = function decode(reader, length, error) {
19064
+ if (!(reader instanceof $Reader))
19065
+ reader = $Reader.create(reader);
19066
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobStatusRequest();
19067
+ while (reader.pos < end) {
19068
+ let tag = reader.uint32();
19069
+ if (tag === error)
19070
+ break;
19071
+ switch (tag >>> 3) {
19072
+ case 1: {
19073
+ message.jobId = reader.uint32();
19074
+ break;
19075
+ }
19076
+ default:
19077
+ reader.skipType(tag & 7);
19078
+ break;
19079
+ }
19080
+ }
19081
+ return message;
19082
+ };
19083
+ JobStatusRequest.decodeDelimited = function decodeDelimited(reader) {
19084
+ if (!(reader instanceof $Reader))
19085
+ reader = new $Reader(reader);
19086
+ return this.decode(reader, reader.uint32());
19087
+ };
19088
+ JobStatusRequest.verify = function verify(message) {
19089
+ if (typeof message !== "object" || message === null)
19090
+ return "object expected";
19091
+ if (message.jobId != null && message.hasOwnProperty("jobId")) {
19092
+ if (!$util.isInteger(message.jobId))
19093
+ return "jobId: integer expected";
19094
+ }
19095
+ return null;
19096
+ };
19097
+ JobStatusRequest.fromObject = function fromObject(object) {
19098
+ if (object instanceof $root.sesame.v1.jobs.JobStatusRequest)
19099
+ return object;
19100
+ let message = new $root.sesame.v1.jobs.JobStatusRequest();
19101
+ if (object.jobId != null)
19102
+ message.jobId = object.jobId >>> 0;
19103
+ return message;
19104
+ };
19105
+ JobStatusRequest.toObject = function toObject(message, options) {
19106
+ if (!options)
19107
+ options = {};
19108
+ let object = {};
19109
+ if (options.defaults)
19110
+ object.jobId = 0;
19111
+ if (message.jobId != null && message.hasOwnProperty("jobId"))
19112
+ object.jobId = message.jobId;
19113
+ return object;
19114
+ };
19115
+ JobStatusRequest.prototype.toJSON = function toJSON() {
19116
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
19117
+ };
19118
+ JobStatusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
19119
+ if (typeUrlPrefix === void 0) {
19120
+ typeUrlPrefix = "type.googleapis.com";
19121
+ }
19122
+ return typeUrlPrefix + "/sesame.v1.jobs.JobStatusRequest";
19123
+ };
19124
+ return JobStatusRequest;
19125
+ }();
19126
+ jobs.JobListRequest = function() {
19127
+ function JobListRequest(properties) {
19128
+ if (properties) {
19129
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
19130
+ if (properties[keys[i]] != null)
19131
+ this[keys[i]] = properties[keys[i]];
19132
+ }
19133
+ }
19134
+ JobListRequest.create = function create(properties) {
19135
+ return new JobListRequest(properties);
19136
+ };
19137
+ JobListRequest.encode = function encode(message, writer) {
19138
+ if (!writer)
19139
+ writer = $Writer.create();
19140
+ return writer;
19141
+ };
19142
+ JobListRequest.encodeDelimited = function encodeDelimited(message, writer) {
19143
+ return this.encode(message, writer).ldelim();
19144
+ };
19145
+ JobListRequest.decode = function decode(reader, length, error) {
19146
+ if (!(reader instanceof $Reader))
19147
+ reader = $Reader.create(reader);
19148
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.JobListRequest();
19149
+ while (reader.pos < end) {
19150
+ let tag = reader.uint32();
19151
+ if (tag === error)
19152
+ break;
19153
+ switch (tag >>> 3) {
19154
+ default:
19155
+ reader.skipType(tag & 7);
19156
+ break;
19157
+ }
19158
+ }
19159
+ return message;
19160
+ };
19161
+ JobListRequest.decodeDelimited = function decodeDelimited(reader) {
19162
+ if (!(reader instanceof $Reader))
19163
+ reader = new $Reader(reader);
19164
+ return this.decode(reader, reader.uint32());
19165
+ };
19166
+ JobListRequest.verify = function verify(message) {
19167
+ if (typeof message !== "object" || message === null)
19168
+ return "object expected";
19169
+ return null;
19170
+ };
19171
+ JobListRequest.fromObject = function fromObject(object) {
19172
+ if (object instanceof $root.sesame.v1.jobs.JobListRequest)
19173
+ return object;
19174
+ return new $root.sesame.v1.jobs.JobListRequest();
19175
+ };
19176
+ JobListRequest.toObject = function toObject() {
19177
+ return {};
19178
+ };
19179
+ JobListRequest.prototype.toJSON = function toJSON() {
19180
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
19181
+ };
19182
+ JobListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
19183
+ if (typeUrlPrefix === void 0) {
19184
+ typeUrlPrefix = "type.googleapis.com";
19185
+ }
19186
+ return typeUrlPrefix + "/sesame.v1.jobs.JobListRequest";
19187
+ };
19188
+ return JobListRequest;
19189
+ }();
19190
+ jobs.ExportConfiguration = function() {
19191
+ function ExportConfiguration(properties) {
19192
+ this.audioRouting = [];
19193
+ if (properties) {
19194
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
19195
+ if (properties[keys[i]] != null)
19196
+ this[keys[i]] = properties[keys[i]];
19197
+ }
19198
+ }
19199
+ ExportConfiguration.prototype.filename = "";
19200
+ ExportConfiguration.prototype.container = 0;
19201
+ ExportConfiguration.prototype.videoCodec = 0;
19202
+ ExportConfiguration.prototype.width = 0;
19203
+ ExportConfiguration.prototype.height = 0;
19204
+ ExportConfiguration.prototype.fpsNum = 0;
19205
+ ExportConfiguration.prototype.fpsDen = 0;
19206
+ ExportConfiguration.prototype.rateControl = 0;
19207
+ ExportConfiguration.prototype.videoBitrateKbps = 0;
19208
+ ExportConfiguration.prototype.maxVideoBitrateKbps = 0;
19209
+ ExportConfiguration.prototype.gopSize = 0;
19210
+ ExportConfiguration.prototype.maxBFrames = 0;
19211
+ ExportConfiguration.prototype.profile = "";
19212
+ ExportConfiguration.prototype.level = "";
19213
+ ExportConfiguration.prototype.pixelFormat = "";
19214
+ ExportConfiguration.prototype.colorPrimaries = "";
19215
+ ExportConfiguration.prototype.colorTransfer = "";
19216
+ ExportConfiguration.prototype.colorMatrix = "";
19217
+ ExportConfiguration.prototype.fullRange = false;
18791
19218
  ExportConfiguration.prototype.audioCodec = 0;
18792
19219
  ExportConfiguration.prototype.audioBitrateKbps = 0;
18793
19220
  ExportConfiguration.prototype.audioSampleRateHz = 0;
@@ -19081,6 +19508,11 @@ var sesame = $root.sesame = (() => {
19081
19508
  case 4:
19082
19509
  case 5:
19083
19510
  case 6:
19511
+ case 7:
19512
+ case 64:
19513
+ case 65:
19514
+ case 66:
19515
+ case 67:
19084
19516
  break;
19085
19517
  }
19086
19518
  if (message.width != null && message.hasOwnProperty("width")) {
@@ -19162,6 +19594,13 @@ var sesame = $root.sesame = (() => {
19162
19594
  case 2:
19163
19595
  case 3:
19164
19596
  case 4:
19597
+ case 5:
19598
+ case 6:
19599
+ case 7:
19600
+ case 64:
19601
+ case 65:
19602
+ case 66:
19603
+ case 67:
19165
19604
  break;
19166
19605
  }
19167
19606
  if (message.audioBitrateKbps != null && message.hasOwnProperty("audioBitrateKbps")) {
@@ -19226,34 +19665,54 @@ var sesame = $root.sesame = (() => {
19226
19665
  break;
19227
19666
  }
19228
19667
  break;
19229
- case "CODEC_ID_UNSPECIFIED":
19668
+ case "CODEC_TYPE_UNSPECIFIED":
19230
19669
  case 0:
19231
19670
  message.videoCodec = 0;
19232
19671
  break;
19233
- case "CODEC_ID_H264":
19672
+ case "CODEC_TYPE_VIDEO_VP8":
19234
19673
  case 1:
19235
19674
  message.videoCodec = 1;
19236
19675
  break;
19237
- case "CODEC_ID_HEVC":
19676
+ case "CODEC_TYPE_VIDEO_VP9":
19238
19677
  case 2:
19239
19678
  message.videoCodec = 2;
19240
19679
  break;
19241
- case "CODEC_ID_AV1":
19680
+ case "CODEC_TYPE_VIDEO_AVC":
19242
19681
  case 3:
19243
19682
  message.videoCodec = 3;
19244
19683
  break;
19245
- case "CODEC_ID_VP8":
19684
+ case "CODEC_TYPE_VIDEO_HEVC":
19246
19685
  case 4:
19247
19686
  message.videoCodec = 4;
19248
19687
  break;
19249
- case "CODEC_ID_PRORES":
19688
+ case "CODEC_TYPE_VIDEO_AV1":
19250
19689
  case 5:
19251
19690
  message.videoCodec = 5;
19252
19691
  break;
19253
- case "CODEC_ID_DNXHR":
19692
+ case "CODEC_TYPE_VIDEO_PRORES":
19254
19693
  case 6:
19255
19694
  message.videoCodec = 6;
19256
19695
  break;
19696
+ case "CODEC_TYPE_VIDEO_DNXHR":
19697
+ case 7:
19698
+ message.videoCodec = 7;
19699
+ break;
19700
+ case "CODEC_TYPE_AUDIO_OPUS":
19701
+ case 64:
19702
+ message.videoCodec = 64;
19703
+ break;
19704
+ case "CODEC_TYPE_AUDIO_AAC":
19705
+ case 65:
19706
+ message.videoCodec = 65;
19707
+ break;
19708
+ case "CODEC_TYPE_AUDIO_PCM":
19709
+ case 66:
19710
+ message.videoCodec = 66;
19711
+ break;
19712
+ case "CODEC_TYPE_AUDIO_PCM_S24LE":
19713
+ case 67:
19714
+ message.videoCodec = 67;
19715
+ break;
19257
19716
  }
19258
19717
  if (object.width != null)
19259
19718
  message.width = object.width >>> 0;
@@ -19316,26 +19775,54 @@ var sesame = $root.sesame = (() => {
19316
19775
  break;
19317
19776
  }
19318
19777
  break;
19319
- case "AUDIO_CODEC_ID_UNSPECIFIED":
19778
+ case "CODEC_TYPE_UNSPECIFIED":
19320
19779
  case 0:
19321
19780
  message.audioCodec = 0;
19322
19781
  break;
19323
- case "AUDIO_CODEC_ID_AAC":
19782
+ case "CODEC_TYPE_VIDEO_VP8":
19324
19783
  case 1:
19325
19784
  message.audioCodec = 1;
19326
19785
  break;
19327
- case "AUDIO_CODEC_ID_OPUS":
19786
+ case "CODEC_TYPE_VIDEO_VP9":
19328
19787
  case 2:
19329
19788
  message.audioCodec = 2;
19330
19789
  break;
19331
- case "AUDIO_CODEC_ID_PCM_S16LE":
19790
+ case "CODEC_TYPE_VIDEO_AVC":
19332
19791
  case 3:
19333
19792
  message.audioCodec = 3;
19334
19793
  break;
19335
- case "AUDIO_CODEC_ID_PCM_S24LE":
19794
+ case "CODEC_TYPE_VIDEO_HEVC":
19336
19795
  case 4:
19337
19796
  message.audioCodec = 4;
19338
19797
  break;
19798
+ case "CODEC_TYPE_VIDEO_AV1":
19799
+ case 5:
19800
+ message.audioCodec = 5;
19801
+ break;
19802
+ case "CODEC_TYPE_VIDEO_PRORES":
19803
+ case 6:
19804
+ message.audioCodec = 6;
19805
+ break;
19806
+ case "CODEC_TYPE_VIDEO_DNXHR":
19807
+ case 7:
19808
+ message.audioCodec = 7;
19809
+ break;
19810
+ case "CODEC_TYPE_AUDIO_OPUS":
19811
+ case 64:
19812
+ message.audioCodec = 64;
19813
+ break;
19814
+ case "CODEC_TYPE_AUDIO_AAC":
19815
+ case 65:
19816
+ message.audioCodec = 65;
19817
+ break;
19818
+ case "CODEC_TYPE_AUDIO_PCM":
19819
+ case 66:
19820
+ message.audioCodec = 66;
19821
+ break;
19822
+ case "CODEC_TYPE_AUDIO_PCM_S24LE":
19823
+ case 67:
19824
+ message.audioCodec = 67;
19825
+ break;
19339
19826
  }
19340
19827
  if (object.audioBitrateKbps != null)
19341
19828
  message.audioBitrateKbps = object.audioBitrateKbps >>> 0;
@@ -19361,7 +19848,7 @@ var sesame = $root.sesame = (() => {
19361
19848
  if (options.defaults) {
19362
19849
  object.filename = "";
19363
19850
  object.container = options.enums === String ? "CONTAINER_FORMAT_UNSPECIFIED" : 0;
19364
- object.videoCodec = options.enums === String ? "CODEC_ID_UNSPECIFIED" : 0;
19851
+ object.videoCodec = options.enums === String ? "CODEC_TYPE_UNSPECIFIED" : 0;
19365
19852
  object.width = 0;
19366
19853
  object.height = 0;
19367
19854
  object.fpsNum = 0;
@@ -19378,7 +19865,7 @@ var sesame = $root.sesame = (() => {
19378
19865
  object.colorTransfer = "";
19379
19866
  object.colorMatrix = "";
19380
19867
  object.fullRange = false;
19381
- object.audioCodec = options.enums === String ? "AUDIO_CODEC_ID_UNSPECIFIED" : 0;
19868
+ object.audioCodec = options.enums === String ? "CODEC_TYPE_UNSPECIFIED" : 0;
19382
19869
  object.audioBitrateKbps = 0;
19383
19870
  object.audioSampleRateHz = 0;
19384
19871
  object.audioChannels = 0;
@@ -19388,7 +19875,7 @@ var sesame = $root.sesame = (() => {
19388
19875
  if (message.container != null && message.hasOwnProperty("container"))
19389
19876
  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;
19390
19877
  if (message.videoCodec != null && message.hasOwnProperty("videoCodec"))
19391
- 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;
19878
+ 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;
19392
19879
  if (message.width != null && message.hasOwnProperty("width"))
19393
19880
  object.width = message.width;
19394
19881
  if (message.height != null && message.hasOwnProperty("height"))
@@ -19422,7 +19909,7 @@ var sesame = $root.sesame = (() => {
19422
19909
  if (message.fullRange != null && message.hasOwnProperty("fullRange"))
19423
19910
  object.fullRange = message.fullRange;
19424
19911
  if (message.audioCodec != null && message.hasOwnProperty("audioCodec"))
19425
- 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;
19912
+ 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;
19426
19913
  if (message.audioBitrateKbps != null && message.hasOwnProperty("audioBitrateKbps"))
19427
19914
  object.audioBitrateKbps = message.audioBitrateKbps;
19428
19915
  if (message.audioSampleRateHz != null && message.hasOwnProperty("audioSampleRateHz"))
@@ -19579,268 +20066,28 @@ var sesame = $root.sesame = (() => {
19579
20066
  };
19580
20067
  return ExportStartRequest;
19581
20068
  }();
19582
- jobs.ExportAbortRequest = function() {
19583
- function ExportAbortRequest(properties) {
20069
+ jobs.ImportConfiguration = function() {
20070
+ function ImportConfiguration(properties) {
20071
+ this.audioRouting = [];
19584
20072
  if (properties) {
19585
20073
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
19586
20074
  if (properties[keys[i]] != null)
19587
20075
  this[keys[i]] = properties[keys[i]];
19588
20076
  }
19589
20077
  }
19590
- ExportAbortRequest.prototype.jobId = 0;
19591
- ExportAbortRequest.create = function create(properties) {
19592
- return new ExportAbortRequest(properties);
20078
+ ImportConfiguration.prototype.srcFilename = "";
20079
+ ImportConfiguration.prototype.audioRouting = $util.emptyArray;
20080
+ ImportConfiguration.prototype.dstRecorderId = "";
20081
+ ImportConfiguration.prototype.dstClipId = $util.Long ? $util.Long.fromBits(0, 0, true) : 0;
20082
+ ImportConfiguration.prototype.dstClipName = "";
20083
+ ImportConfiguration.prototype.dstClipUserData = "";
20084
+ ImportConfiguration.create = function create(properties) {
20085
+ return new ImportConfiguration(properties);
19593
20086
  };
19594
- ExportAbortRequest.encode = function encode(message, writer) {
20087
+ ImportConfiguration.encode = function encode(message, writer) {
19595
20088
  if (!writer)
19596
20089
  writer = $Writer.create();
19597
- if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
19598
- writer.uint32(
19599
- /* id 1, wireType 0 =*/
19600
- 8
19601
- ).uint32(message.jobId);
19602
- return writer;
19603
- };
19604
- ExportAbortRequest.encodeDelimited = function encodeDelimited(message, writer) {
19605
- return this.encode(message, writer).ldelim();
19606
- };
19607
- ExportAbortRequest.decode = function decode(reader, length, error) {
19608
- if (!(reader instanceof $Reader))
19609
- reader = $Reader.create(reader);
19610
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.ExportAbortRequest();
19611
- while (reader.pos < end) {
19612
- let tag = reader.uint32();
19613
- if (tag === error)
19614
- break;
19615
- switch (tag >>> 3) {
19616
- case 1: {
19617
- message.jobId = reader.uint32();
19618
- break;
19619
- }
19620
- default:
19621
- reader.skipType(tag & 7);
19622
- break;
19623
- }
19624
- }
19625
- return message;
19626
- };
19627
- ExportAbortRequest.decodeDelimited = function decodeDelimited(reader) {
19628
- if (!(reader instanceof $Reader))
19629
- reader = new $Reader(reader);
19630
- return this.decode(reader, reader.uint32());
19631
- };
19632
- ExportAbortRequest.verify = function verify(message) {
19633
- if (typeof message !== "object" || message === null)
19634
- return "object expected";
19635
- if (message.jobId != null && message.hasOwnProperty("jobId")) {
19636
- if (!$util.isInteger(message.jobId))
19637
- return "jobId: integer expected";
19638
- }
19639
- return null;
19640
- };
19641
- ExportAbortRequest.fromObject = function fromObject(object) {
19642
- if (object instanceof $root.sesame.v1.jobs.ExportAbortRequest)
19643
- return object;
19644
- let message = new $root.sesame.v1.jobs.ExportAbortRequest();
19645
- if (object.jobId != null)
19646
- message.jobId = object.jobId >>> 0;
19647
- return message;
19648
- };
19649
- ExportAbortRequest.toObject = function toObject(message, options) {
19650
- if (!options)
19651
- options = {};
19652
- let object = {};
19653
- if (options.defaults)
19654
- object.jobId = 0;
19655
- if (message.jobId != null && message.hasOwnProperty("jobId"))
19656
- object.jobId = message.jobId;
19657
- return object;
19658
- };
19659
- ExportAbortRequest.prototype.toJSON = function toJSON() {
19660
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
19661
- };
19662
- ExportAbortRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
19663
- if (typeUrlPrefix === void 0) {
19664
- typeUrlPrefix = "type.googleapis.com";
19665
- }
19666
- return typeUrlPrefix + "/sesame.v1.jobs.ExportAbortRequest";
19667
- };
19668
- return ExportAbortRequest;
19669
- }();
19670
- jobs.ExportStatusRequest = function() {
19671
- function ExportStatusRequest(properties) {
19672
- if (properties) {
19673
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
19674
- if (properties[keys[i]] != null)
19675
- this[keys[i]] = properties[keys[i]];
19676
- }
19677
- }
19678
- ExportStatusRequest.prototype.jobId = 0;
19679
- ExportStatusRequest.create = function create(properties) {
19680
- return new ExportStatusRequest(properties);
19681
- };
19682
- ExportStatusRequest.encode = function encode(message, writer) {
19683
- if (!writer)
19684
- writer = $Writer.create();
19685
- if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
19686
- writer.uint32(
19687
- /* id 1, wireType 0 =*/
19688
- 8
19689
- ).uint32(message.jobId);
19690
- return writer;
19691
- };
19692
- ExportStatusRequest.encodeDelimited = function encodeDelimited(message, writer) {
19693
- return this.encode(message, writer).ldelim();
19694
- };
19695
- ExportStatusRequest.decode = function decode(reader, length, error) {
19696
- if (!(reader instanceof $Reader))
19697
- reader = $Reader.create(reader);
19698
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.ExportStatusRequest();
19699
- while (reader.pos < end) {
19700
- let tag = reader.uint32();
19701
- if (tag === error)
19702
- break;
19703
- switch (tag >>> 3) {
19704
- case 1: {
19705
- message.jobId = reader.uint32();
19706
- break;
19707
- }
19708
- default:
19709
- reader.skipType(tag & 7);
19710
- break;
19711
- }
19712
- }
19713
- return message;
19714
- };
19715
- ExportStatusRequest.decodeDelimited = function decodeDelimited(reader) {
19716
- if (!(reader instanceof $Reader))
19717
- reader = new $Reader(reader);
19718
- return this.decode(reader, reader.uint32());
19719
- };
19720
- ExportStatusRequest.verify = function verify(message) {
19721
- if (typeof message !== "object" || message === null)
19722
- return "object expected";
19723
- if (message.jobId != null && message.hasOwnProperty("jobId")) {
19724
- if (!$util.isInteger(message.jobId))
19725
- return "jobId: integer expected";
19726
- }
19727
- return null;
19728
- };
19729
- ExportStatusRequest.fromObject = function fromObject(object) {
19730
- if (object instanceof $root.sesame.v1.jobs.ExportStatusRequest)
19731
- return object;
19732
- let message = new $root.sesame.v1.jobs.ExportStatusRequest();
19733
- if (object.jobId != null)
19734
- message.jobId = object.jobId >>> 0;
19735
- return message;
19736
- };
19737
- ExportStatusRequest.toObject = function toObject(message, options) {
19738
- if (!options)
19739
- options = {};
19740
- let object = {};
19741
- if (options.defaults)
19742
- object.jobId = 0;
19743
- if (message.jobId != null && message.hasOwnProperty("jobId"))
19744
- object.jobId = message.jobId;
19745
- return object;
19746
- };
19747
- ExportStatusRequest.prototype.toJSON = function toJSON() {
19748
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
19749
- };
19750
- ExportStatusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
19751
- if (typeUrlPrefix === void 0) {
19752
- typeUrlPrefix = "type.googleapis.com";
19753
- }
19754
- return typeUrlPrefix + "/sesame.v1.jobs.ExportStatusRequest";
19755
- };
19756
- return ExportStatusRequest;
19757
- }();
19758
- jobs.ExportListRequest = function() {
19759
- function ExportListRequest(properties) {
19760
- if (properties) {
19761
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
19762
- if (properties[keys[i]] != null)
19763
- this[keys[i]] = properties[keys[i]];
19764
- }
19765
- }
19766
- ExportListRequest.create = function create(properties) {
19767
- return new ExportListRequest(properties);
19768
- };
19769
- ExportListRequest.encode = function encode(message, writer) {
19770
- if (!writer)
19771
- writer = $Writer.create();
19772
- return writer;
19773
- };
19774
- ExportListRequest.encodeDelimited = function encodeDelimited(message, writer) {
19775
- return this.encode(message, writer).ldelim();
19776
- };
19777
- ExportListRequest.decode = function decode(reader, length, error) {
19778
- if (!(reader instanceof $Reader))
19779
- reader = $Reader.create(reader);
19780
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.ExportListRequest();
19781
- while (reader.pos < end) {
19782
- let tag = reader.uint32();
19783
- if (tag === error)
19784
- break;
19785
- switch (tag >>> 3) {
19786
- default:
19787
- reader.skipType(tag & 7);
19788
- break;
19789
- }
19790
- }
19791
- return message;
19792
- };
19793
- ExportListRequest.decodeDelimited = function decodeDelimited(reader) {
19794
- if (!(reader instanceof $Reader))
19795
- reader = new $Reader(reader);
19796
- return this.decode(reader, reader.uint32());
19797
- };
19798
- ExportListRequest.verify = function verify(message) {
19799
- if (typeof message !== "object" || message === null)
19800
- return "object expected";
19801
- return null;
19802
- };
19803
- ExportListRequest.fromObject = function fromObject(object) {
19804
- if (object instanceof $root.sesame.v1.jobs.ExportListRequest)
19805
- return object;
19806
- return new $root.sesame.v1.jobs.ExportListRequest();
19807
- };
19808
- ExportListRequest.toObject = function toObject() {
19809
- return {};
19810
- };
19811
- ExportListRequest.prototype.toJSON = function toJSON() {
19812
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
19813
- };
19814
- ExportListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
19815
- if (typeUrlPrefix === void 0) {
19816
- typeUrlPrefix = "type.googleapis.com";
19817
- }
19818
- return typeUrlPrefix + "/sesame.v1.jobs.ExportListRequest";
19819
- };
19820
- return ExportListRequest;
19821
- }();
19822
- jobs.ImportConfiguration = function() {
19823
- function ImportConfiguration(properties) {
19824
- this.audioRouting = [];
19825
- if (properties) {
19826
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
19827
- if (properties[keys[i]] != null)
19828
- this[keys[i]] = properties[keys[i]];
19829
- }
19830
- }
19831
- ImportConfiguration.prototype.srcFilename = "";
19832
- ImportConfiguration.prototype.audioRouting = $util.emptyArray;
19833
- ImportConfiguration.prototype.dstRecorderId = "";
19834
- ImportConfiguration.prototype.dstClipId = $util.Long ? $util.Long.fromBits(0, 0, true) : 0;
19835
- ImportConfiguration.prototype.dstClipName = "";
19836
- ImportConfiguration.prototype.dstClipUserData = "";
19837
- ImportConfiguration.create = function create(properties) {
19838
- return new ImportConfiguration(properties);
19839
- };
19840
- ImportConfiguration.encode = function encode(message, writer) {
19841
- if (!writer)
19842
- writer = $Writer.create();
19843
- if (message.srcFilename != null && Object.hasOwnProperty.call(message, "srcFilename"))
20090
+ if (message.srcFilename != null && Object.hasOwnProperty.call(message, "srcFilename"))
19844
20091
  writer.uint32(
19845
20092
  /* id 1, wireType 2 =*/
19846
20093
  10
@@ -20134,42 +20381,71 @@ var sesame = $root.sesame = (() => {
20134
20381
  };
20135
20382
  return ImportStartRequest;
20136
20383
  }();
20137
- jobs.ImportAbortRequest = function() {
20138
- function ImportAbortRequest(properties) {
20384
+ return jobs;
20385
+ }();
20386
+ v1.rpc = function() {
20387
+ const rpc = {};
20388
+ rpc.Message = function() {
20389
+ function Message2(properties) {
20139
20390
  if (properties) {
20140
20391
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
20141
20392
  if (properties[keys[i]] != null)
20142
20393
  this[keys[i]] = properties[keys[i]];
20143
20394
  }
20144
20395
  }
20145
- ImportAbortRequest.prototype.jobId = 0;
20146
- ImportAbortRequest.create = function create(properties) {
20147
- return new ImportAbortRequest(properties);
20396
+ Message2.prototype.request = null;
20397
+ Message2.prototype.response = null;
20398
+ Message2.prototype.event = null;
20399
+ let $oneOfFields;
20400
+ Object.defineProperty(Message2.prototype, "payload", {
20401
+ get: $util.oneOfGetter($oneOfFields = ["request", "response", "event"]),
20402
+ set: $util.oneOfSetter($oneOfFields)
20403
+ });
20404
+ Message2.create = function create(properties) {
20405
+ return new Message2(properties);
20148
20406
  };
20149
- ImportAbortRequest.encode = function encode(message, writer) {
20407
+ Message2.encode = function encode(message, writer) {
20150
20408
  if (!writer)
20151
20409
  writer = $Writer.create();
20152
- if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
20153
- writer.uint32(
20154
- /* id 1, wireType 0 =*/
20155
- 8
20156
- ).uint32(message.jobId);
20410
+ if (message.request != null && Object.hasOwnProperty.call(message, "request"))
20411
+ $root.sesame.v1.rpc.Request.encode(message.request, writer.uint32(
20412
+ /* id 1, wireType 2 =*/
20413
+ 10
20414
+ ).fork()).ldelim();
20415
+ if (message.response != null && Object.hasOwnProperty.call(message, "response"))
20416
+ $root.sesame.v1.rpc.Response.encode(message.response, writer.uint32(
20417
+ /* id 2, wireType 2 =*/
20418
+ 18
20419
+ ).fork()).ldelim();
20420
+ if (message.event != null && Object.hasOwnProperty.call(message, "event"))
20421
+ $root.sesame.v1.rpc.Event.encode(message.event, writer.uint32(
20422
+ /* id 3, wireType 2 =*/
20423
+ 26
20424
+ ).fork()).ldelim();
20157
20425
  return writer;
20158
20426
  };
20159
- ImportAbortRequest.encodeDelimited = function encodeDelimited(message, writer) {
20427
+ Message2.encodeDelimited = function encodeDelimited(message, writer) {
20160
20428
  return this.encode(message, writer).ldelim();
20161
20429
  };
20162
- ImportAbortRequest.decode = function decode(reader, length, error) {
20430
+ Message2.decode = function decode(reader, length, error) {
20163
20431
  if (!(reader instanceof $Reader))
20164
20432
  reader = $Reader.create(reader);
20165
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.ImportAbortRequest();
20433
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.rpc.Message();
20166
20434
  while (reader.pos < end) {
20167
20435
  let tag = reader.uint32();
20168
20436
  if (tag === error)
20169
20437
  break;
20170
20438
  switch (tag >>> 3) {
20171
20439
  case 1: {
20172
- message.jobId = reader.uint32();
20440
+ message.request = $root.sesame.v1.rpc.Request.decode(reader, reader.uint32());
20441
+ break;
20442
+ }
20443
+ case 2: {
20444
+ message.response = $root.sesame.v1.rpc.Response.decode(reader, reader.uint32());
20445
+ break;
20446
+ }
20447
+ case 3: {
20448
+ message.event = $root.sesame.v1.rpc.Event.decode(reader, reader.uint32());
20173
20449
  break;
20174
20450
  }
20175
20451
  default:
@@ -20179,291 +20455,22 @@ var sesame = $root.sesame = (() => {
20179
20455
  }
20180
20456
  return message;
20181
20457
  };
20182
- ImportAbortRequest.decodeDelimited = function decodeDelimited(reader) {
20458
+ Message2.decodeDelimited = function decodeDelimited(reader) {
20183
20459
  if (!(reader instanceof $Reader))
20184
20460
  reader = new $Reader(reader);
20185
20461
  return this.decode(reader, reader.uint32());
20186
20462
  };
20187
- ImportAbortRequest.verify = function verify(message) {
20463
+ Message2.verify = function verify(message) {
20188
20464
  if (typeof message !== "object" || message === null)
20189
20465
  return "object expected";
20190
- if (message.jobId != null && message.hasOwnProperty("jobId")) {
20191
- if (!$util.isInteger(message.jobId))
20192
- return "jobId: integer expected";
20193
- }
20194
- return null;
20195
- };
20196
- ImportAbortRequest.fromObject = function fromObject(object) {
20197
- if (object instanceof $root.sesame.v1.jobs.ImportAbortRequest)
20198
- return object;
20199
- let message = new $root.sesame.v1.jobs.ImportAbortRequest();
20200
- if (object.jobId != null)
20201
- message.jobId = object.jobId >>> 0;
20202
- return message;
20203
- };
20204
- ImportAbortRequest.toObject = function toObject(message, options) {
20205
- if (!options)
20206
- options = {};
20207
- let object = {};
20208
- if (options.defaults)
20209
- object.jobId = 0;
20210
- if (message.jobId != null && message.hasOwnProperty("jobId"))
20211
- object.jobId = message.jobId;
20212
- return object;
20213
- };
20214
- ImportAbortRequest.prototype.toJSON = function toJSON() {
20215
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
20216
- };
20217
- ImportAbortRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
20218
- if (typeUrlPrefix === void 0) {
20219
- typeUrlPrefix = "type.googleapis.com";
20220
- }
20221
- return typeUrlPrefix + "/sesame.v1.jobs.ImportAbortRequest";
20222
- };
20223
- return ImportAbortRequest;
20224
- }();
20225
- jobs.ImportStatusRequest = function() {
20226
- function ImportStatusRequest(properties) {
20227
- if (properties) {
20228
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
20229
- if (properties[keys[i]] != null)
20230
- this[keys[i]] = properties[keys[i]];
20231
- }
20232
- }
20233
- ImportStatusRequest.prototype.jobId = 0;
20234
- ImportStatusRequest.create = function create(properties) {
20235
- return new ImportStatusRequest(properties);
20236
- };
20237
- ImportStatusRequest.encode = function encode(message, writer) {
20238
- if (!writer)
20239
- writer = $Writer.create();
20240
- if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId"))
20241
- writer.uint32(
20242
- /* id 1, wireType 0 =*/
20243
- 8
20244
- ).uint32(message.jobId);
20245
- return writer;
20246
- };
20247
- ImportStatusRequest.encodeDelimited = function encodeDelimited(message, writer) {
20248
- return this.encode(message, writer).ldelim();
20249
- };
20250
- ImportStatusRequest.decode = function decode(reader, length, error) {
20251
- if (!(reader instanceof $Reader))
20252
- reader = $Reader.create(reader);
20253
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.ImportStatusRequest();
20254
- while (reader.pos < end) {
20255
- let tag = reader.uint32();
20256
- if (tag === error)
20257
- break;
20258
- switch (tag >>> 3) {
20259
- case 1: {
20260
- message.jobId = reader.uint32();
20261
- break;
20262
- }
20263
- default:
20264
- reader.skipType(tag & 7);
20265
- break;
20266
- }
20267
- }
20268
- return message;
20269
- };
20270
- ImportStatusRequest.decodeDelimited = function decodeDelimited(reader) {
20271
- if (!(reader instanceof $Reader))
20272
- reader = new $Reader(reader);
20273
- return this.decode(reader, reader.uint32());
20274
- };
20275
- ImportStatusRequest.verify = function verify(message) {
20276
- if (typeof message !== "object" || message === null)
20277
- return "object expected";
20278
- if (message.jobId != null && message.hasOwnProperty("jobId")) {
20279
- if (!$util.isInteger(message.jobId))
20280
- return "jobId: integer expected";
20281
- }
20282
- return null;
20283
- };
20284
- ImportStatusRequest.fromObject = function fromObject(object) {
20285
- if (object instanceof $root.sesame.v1.jobs.ImportStatusRequest)
20286
- return object;
20287
- let message = new $root.sesame.v1.jobs.ImportStatusRequest();
20288
- if (object.jobId != null)
20289
- message.jobId = object.jobId >>> 0;
20290
- return message;
20291
- };
20292
- ImportStatusRequest.toObject = function toObject(message, options) {
20293
- if (!options)
20294
- options = {};
20295
- let object = {};
20296
- if (options.defaults)
20297
- object.jobId = 0;
20298
- if (message.jobId != null && message.hasOwnProperty("jobId"))
20299
- object.jobId = message.jobId;
20300
- return object;
20301
- };
20302
- ImportStatusRequest.prototype.toJSON = function toJSON() {
20303
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
20304
- };
20305
- ImportStatusRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
20306
- if (typeUrlPrefix === void 0) {
20307
- typeUrlPrefix = "type.googleapis.com";
20308
- }
20309
- return typeUrlPrefix + "/sesame.v1.jobs.ImportStatusRequest";
20310
- };
20311
- return ImportStatusRequest;
20312
- }();
20313
- jobs.ImportListRequest = function() {
20314
- function ImportListRequest(properties) {
20315
- if (properties) {
20316
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
20317
- if (properties[keys[i]] != null)
20318
- this[keys[i]] = properties[keys[i]];
20319
- }
20320
- }
20321
- ImportListRequest.create = function create(properties) {
20322
- return new ImportListRequest(properties);
20323
- };
20324
- ImportListRequest.encode = function encode(message, writer) {
20325
- if (!writer)
20326
- writer = $Writer.create();
20327
- return writer;
20328
- };
20329
- ImportListRequest.encodeDelimited = function encodeDelimited(message, writer) {
20330
- return this.encode(message, writer).ldelim();
20331
- };
20332
- ImportListRequest.decode = function decode(reader, length, error) {
20333
- if (!(reader instanceof $Reader))
20334
- reader = $Reader.create(reader);
20335
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.jobs.ImportListRequest();
20336
- while (reader.pos < end) {
20337
- let tag = reader.uint32();
20338
- if (tag === error)
20339
- break;
20340
- switch (tag >>> 3) {
20341
- default:
20342
- reader.skipType(tag & 7);
20343
- break;
20344
- }
20345
- }
20346
- return message;
20347
- };
20348
- ImportListRequest.decodeDelimited = function decodeDelimited(reader) {
20349
- if (!(reader instanceof $Reader))
20350
- reader = new $Reader(reader);
20351
- return this.decode(reader, reader.uint32());
20352
- };
20353
- ImportListRequest.verify = function verify(message) {
20354
- if (typeof message !== "object" || message === null)
20355
- return "object expected";
20356
- return null;
20357
- };
20358
- ImportListRequest.fromObject = function fromObject(object) {
20359
- if (object instanceof $root.sesame.v1.jobs.ImportListRequest)
20360
- return object;
20361
- return new $root.sesame.v1.jobs.ImportListRequest();
20362
- };
20363
- ImportListRequest.toObject = function toObject() {
20364
- return {};
20365
- };
20366
- ImportListRequest.prototype.toJSON = function toJSON() {
20367
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
20368
- };
20369
- ImportListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
20370
- if (typeUrlPrefix === void 0) {
20371
- typeUrlPrefix = "type.googleapis.com";
20372
- }
20373
- return typeUrlPrefix + "/sesame.v1.jobs.ImportListRequest";
20374
- };
20375
- return ImportListRequest;
20376
- }();
20377
- return jobs;
20378
- }();
20379
- v1.rpc = function() {
20380
- const rpc = {};
20381
- rpc.Message = function() {
20382
- function Message2(properties) {
20383
- if (properties) {
20384
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
20385
- if (properties[keys[i]] != null)
20386
- this[keys[i]] = properties[keys[i]];
20387
- }
20388
- }
20389
- Message2.prototype.request = null;
20390
- Message2.prototype.response = null;
20391
- Message2.prototype.event = null;
20392
- let $oneOfFields;
20393
- Object.defineProperty(Message2.prototype, "payload", {
20394
- get: $util.oneOfGetter($oneOfFields = ["request", "response", "event"]),
20395
- set: $util.oneOfSetter($oneOfFields)
20396
- });
20397
- Message2.create = function create(properties) {
20398
- return new Message2(properties);
20399
- };
20400
- Message2.encode = function encode(message, writer) {
20401
- if (!writer)
20402
- writer = $Writer.create();
20403
- if (message.request != null && Object.hasOwnProperty.call(message, "request"))
20404
- $root.sesame.v1.rpc.Request.encode(message.request, writer.uint32(
20405
- /* id 1, wireType 2 =*/
20406
- 10
20407
- ).fork()).ldelim();
20408
- if (message.response != null && Object.hasOwnProperty.call(message, "response"))
20409
- $root.sesame.v1.rpc.Response.encode(message.response, writer.uint32(
20410
- /* id 2, wireType 2 =*/
20411
- 18
20412
- ).fork()).ldelim();
20413
- if (message.event != null && Object.hasOwnProperty.call(message, "event"))
20414
- $root.sesame.v1.rpc.Event.encode(message.event, writer.uint32(
20415
- /* id 3, wireType 2 =*/
20416
- 26
20417
- ).fork()).ldelim();
20418
- return writer;
20419
- };
20420
- Message2.encodeDelimited = function encodeDelimited(message, writer) {
20421
- return this.encode(message, writer).ldelim();
20422
- };
20423
- Message2.decode = function decode(reader, length, error) {
20424
- if (!(reader instanceof $Reader))
20425
- reader = $Reader.create(reader);
20426
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.rpc.Message();
20427
- while (reader.pos < end) {
20428
- let tag = reader.uint32();
20429
- if (tag === error)
20430
- break;
20431
- switch (tag >>> 3) {
20432
- case 1: {
20433
- message.request = $root.sesame.v1.rpc.Request.decode(reader, reader.uint32());
20434
- break;
20435
- }
20436
- case 2: {
20437
- message.response = $root.sesame.v1.rpc.Response.decode(reader, reader.uint32());
20438
- break;
20439
- }
20440
- case 3: {
20441
- message.event = $root.sesame.v1.rpc.Event.decode(reader, reader.uint32());
20442
- break;
20443
- }
20444
- default:
20445
- reader.skipType(tag & 7);
20446
- break;
20447
- }
20448
- }
20449
- return message;
20450
- };
20451
- Message2.decodeDelimited = function decodeDelimited(reader) {
20452
- if (!(reader instanceof $Reader))
20453
- reader = new $Reader(reader);
20454
- return this.decode(reader, reader.uint32());
20455
- };
20456
- Message2.verify = function verify(message) {
20457
- if (typeof message !== "object" || message === null)
20458
- return "object expected";
20459
- let properties = {};
20460
- if (message.request != null && message.hasOwnProperty("request")) {
20461
- properties.payload = 1;
20462
- {
20463
- let error = $root.sesame.v1.rpc.Request.verify(message.request);
20464
- if (error)
20465
- return "request." + error;
20466
- }
20466
+ let properties = {};
20467
+ if (message.request != null && message.hasOwnProperty("request")) {
20468
+ properties.payload = 1;
20469
+ {
20470
+ let error = $root.sesame.v1.rpc.Request.verify(message.request);
20471
+ if (error)
20472
+ return "request." + error;
20473
+ }
20467
20474
  }
20468
20475
  if (message.response != null && message.hasOwnProperty("response")) {
20469
20476
  if (properties.payload === 1)
@@ -20792,93 +20799,799 @@ var sesame = $root.sesame = (() => {
20792
20799
  else if (object.payload.length >= 0)
20793
20800
  message.payload = object.payload;
20794
20801
  }
20795
- if (object.error != null)
20796
- message.error = String(object.error);
20802
+ if (object.error != null)
20803
+ message.error = String(object.error);
20804
+ return message;
20805
+ };
20806
+ Response2.toObject = function toObject(message, options) {
20807
+ if (!options)
20808
+ options = {};
20809
+ let object = {};
20810
+ if (options.defaults) {
20811
+ object.seq = 0;
20812
+ object.ok = false;
20813
+ if (options.bytes === String)
20814
+ object.payload = "";
20815
+ else {
20816
+ object.payload = [];
20817
+ if (options.bytes !== Array)
20818
+ object.payload = $util.newBuffer(object.payload);
20819
+ }
20820
+ object.error = "";
20821
+ }
20822
+ if (message.seq != null && message.hasOwnProperty("seq"))
20823
+ object.seq = message.seq;
20824
+ if (message.ok != null && message.hasOwnProperty("ok"))
20825
+ object.ok = message.ok;
20826
+ if (message.payload != null && message.hasOwnProperty("payload"))
20827
+ 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;
20828
+ if (message.error != null && message.hasOwnProperty("error"))
20829
+ object.error = message.error;
20830
+ return object;
20831
+ };
20832
+ Response2.prototype.toJSON = function toJSON() {
20833
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
20834
+ };
20835
+ Response2.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
20836
+ if (typeUrlPrefix === void 0) {
20837
+ typeUrlPrefix = "type.googleapis.com";
20838
+ }
20839
+ return typeUrlPrefix + "/sesame.v1.rpc.Response";
20840
+ };
20841
+ return Response2;
20842
+ }();
20843
+ rpc.Event = function() {
20844
+ function Event2(properties) {
20845
+ if (properties) {
20846
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
20847
+ if (properties[keys[i]] != null)
20848
+ this[keys[i]] = properties[keys[i]];
20849
+ }
20850
+ }
20851
+ Event2.prototype.topic = 0;
20852
+ Event2.prototype.payload = $util.newBuffer([]);
20853
+ Event2.create = function create(properties) {
20854
+ return new Event2(properties);
20855
+ };
20856
+ Event2.encode = function encode(message, writer) {
20857
+ if (!writer)
20858
+ writer = $Writer.create();
20859
+ if (message.topic != null && Object.hasOwnProperty.call(message, "topic"))
20860
+ writer.uint32(
20861
+ /* id 1, wireType 0 =*/
20862
+ 8
20863
+ ).int32(message.topic);
20864
+ if (message.payload != null && Object.hasOwnProperty.call(message, "payload"))
20865
+ writer.uint32(
20866
+ /* id 2, wireType 2 =*/
20867
+ 18
20868
+ ).bytes(message.payload);
20869
+ return writer;
20870
+ };
20871
+ Event2.encodeDelimited = function encodeDelimited(message, writer) {
20872
+ return this.encode(message, writer).ldelim();
20873
+ };
20874
+ Event2.decode = function decode(reader, length, error) {
20875
+ if (!(reader instanceof $Reader))
20876
+ reader = $Reader.create(reader);
20877
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.rpc.Event();
20878
+ while (reader.pos < end) {
20879
+ let tag = reader.uint32();
20880
+ if (tag === error)
20881
+ break;
20882
+ switch (tag >>> 3) {
20883
+ case 1: {
20884
+ message.topic = reader.int32();
20885
+ break;
20886
+ }
20887
+ case 2: {
20888
+ message.payload = reader.bytes();
20889
+ break;
20890
+ }
20891
+ default:
20892
+ reader.skipType(tag & 7);
20893
+ break;
20894
+ }
20895
+ }
20896
+ return message;
20897
+ };
20898
+ Event2.decodeDelimited = function decodeDelimited(reader) {
20899
+ if (!(reader instanceof $Reader))
20900
+ reader = new $Reader(reader);
20901
+ return this.decode(reader, reader.uint32());
20902
+ };
20903
+ Event2.verify = function verify(message) {
20904
+ if (typeof message !== "object" || message === null)
20905
+ return "object expected";
20906
+ if (message.topic != null && message.hasOwnProperty("topic"))
20907
+ switch (message.topic) {
20908
+ default:
20909
+ return "topic: enum value expected";
20910
+ case 0:
20911
+ case 1:
20912
+ case 2:
20913
+ case 3:
20914
+ case 4:
20915
+ case 6:
20916
+ break;
20917
+ }
20918
+ if (message.payload != null && message.hasOwnProperty("payload")) {
20919
+ if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload)))
20920
+ return "payload: buffer expected";
20921
+ }
20922
+ return null;
20923
+ };
20924
+ Event2.fromObject = function fromObject(object) {
20925
+ if (object instanceof $root.sesame.v1.rpc.Event)
20926
+ return object;
20927
+ let message = new $root.sesame.v1.rpc.Event();
20928
+ switch (object.topic) {
20929
+ default:
20930
+ if (typeof object.topic === "number") {
20931
+ message.topic = object.topic;
20932
+ break;
20933
+ }
20934
+ break;
20935
+ case "EVENT_TOPIC_UNSPECIFIED":
20936
+ case 0:
20937
+ message.topic = 0;
20938
+ break;
20939
+ case "EVENT_TOPIC_ERROR":
20940
+ case 1:
20941
+ message.topic = 1;
20942
+ break;
20943
+ case "EVENT_TOPIC_TRANSPORT":
20944
+ case 2:
20945
+ message.topic = 2;
20946
+ break;
20947
+ case "EVENT_TOPIC_CALLBACK":
20948
+ case 3:
20949
+ message.topic = 3;
20950
+ break;
20951
+ case "EVENT_TOPIC_JOB":
20952
+ case 4:
20953
+ message.topic = 4;
20954
+ break;
20955
+ case "EVENT_TOPIC_RECORDER":
20956
+ case 6:
20957
+ message.topic = 6;
20958
+ break;
20959
+ }
20960
+ if (object.payload != null) {
20961
+ if (typeof object.payload === "string")
20962
+ $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0);
20963
+ else if (object.payload.length >= 0)
20964
+ message.payload = object.payload;
20965
+ }
20966
+ return message;
20967
+ };
20968
+ Event2.toObject = function toObject(message, options) {
20969
+ if (!options)
20970
+ options = {};
20971
+ let object = {};
20972
+ if (options.defaults) {
20973
+ object.topic = options.enums === String ? "EVENT_TOPIC_UNSPECIFIED" : 0;
20974
+ if (options.bytes === String)
20975
+ object.payload = "";
20976
+ else {
20977
+ object.payload = [];
20978
+ if (options.bytes !== Array)
20979
+ object.payload = $util.newBuffer(object.payload);
20980
+ }
20981
+ }
20982
+ if (message.topic != null && message.hasOwnProperty("topic"))
20983
+ 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;
20984
+ if (message.payload != null && message.hasOwnProperty("payload"))
20985
+ 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;
20986
+ return object;
20987
+ };
20988
+ Event2.prototype.toJSON = function toJSON() {
20989
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
20990
+ };
20991
+ Event2.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
20992
+ if (typeUrlPrefix === void 0) {
20993
+ typeUrlPrefix = "type.googleapis.com";
20994
+ }
20995
+ return typeUrlPrefix + "/sesame.v1.rpc.Event";
20996
+ };
20997
+ return Event2;
20998
+ }();
20999
+ rpc.SesameAPIService = function() {
21000
+ function SesameAPIService(rpcImpl, requestDelimited, responseDelimited) {
21001
+ $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
21002
+ }
21003
+ (SesameAPIService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SesameAPIService;
21004
+ SesameAPIService.create = function create(rpcImpl, requestDelimited, responseDelimited) {
21005
+ return new this(rpcImpl, requestDelimited, responseDelimited);
21006
+ };
21007
+ Object.defineProperty(SesameAPIService.prototype.executeCommandList = function executeCommandList(request, callback) {
21008
+ return this.rpcCall(executeCommandList, $root.sesame.v1.commands.CommandList, $root.sesame.v1.commands.CommandExecutionResponse, request, callback);
21009
+ }, "name", { value: "ExecuteCommandList" });
21010
+ Object.defineProperty(SesameAPIService.prototype.updateSubscriptions = function updateSubscriptions(request, callback) {
21011
+ return this.rpcCall(updateSubscriptions, $root.sesame.v1.status.SubscriptionRequest, $root.sesame.v1.common.Empty, request, callback);
21012
+ }, "name", { value: "UpdateSubscriptions" });
21013
+ Object.defineProperty(SesameAPIService.prototype.notImplemented = function notImplemented(request, callback) {
21014
+ return this.rpcCall(notImplemented, $root.sesame.v1.common.Empty, $root.sesame.v1.common.Empty, request, callback);
21015
+ }, "name", { value: "NotImplemented" });
21016
+ Object.defineProperty(SesameAPIService.prototype.requestEvents = function requestEvents(request, callback) {
21017
+ return this.rpcCall(requestEvents, $root.sesame.v1.common.Empty, $root.sesame.v1.status.Event, request, callback);
21018
+ }, "name", { value: "RequestEvents" });
21019
+ Object.defineProperty(SesameAPIService.prototype.requestStatus = function requestStatus(request, callback) {
21020
+ return this.rpcCall(requestStatus, $root.sesame.v1.common.Empty, $root.sesame.v1.status.Status, request, callback);
21021
+ }, "name", { value: "RequestStatus" });
21022
+ Object.defineProperty(SesameAPIService.prototype.requestRecorderOperation = function requestRecorderOperation(request, callback) {
21023
+ return this.rpcCall(requestRecorderOperation, $root.sesame.v1.recorder.RecorderRequest, $root.sesame.v1.recorder.RecorderResponse, request, callback);
21024
+ }, "name", { value: "RequestRecorderOperation" });
21025
+ Object.defineProperty(SesameAPIService.prototype.startJob = function startJob(request, callback) {
21026
+ return this.rpcCall(startJob, $root.sesame.v1.jobs.JobStartRequest, $root.sesame.v1.jobs.Job, request, callback);
21027
+ }, "name", { value: "StartJob" });
21028
+ Object.defineProperty(SesameAPIService.prototype.abortJob = function abortJob(request, callback) {
21029
+ return this.rpcCall(abortJob, $root.sesame.v1.jobs.JobAbortRequest, $root.sesame.v1.jobs.Job, request, callback);
21030
+ }, "name", { value: "AbortJob" });
21031
+ Object.defineProperty(SesameAPIService.prototype.getJobStatus = function getJobStatus(request, callback) {
21032
+ return this.rpcCall(getJobStatus, $root.sesame.v1.jobs.JobStatusRequest, $root.sesame.v1.jobs.Job, request, callback);
21033
+ }, "name", { value: "GetJobStatus" });
21034
+ Object.defineProperty(SesameAPIService.prototype.listJobs = function listJobs(request, callback) {
21035
+ return this.rpcCall(listJobs, $root.sesame.v1.jobs.JobListRequest, $root.sesame.v1.jobs.JobList, request, callback);
21036
+ }, "name", { value: "ListJobs" });
21037
+ Object.defineProperty(SesameAPIService.prototype.requestKeyframe = function requestKeyframe(request, callback) {
21038
+ return this.rpcCall(requestKeyframe, $root.sesame.v1.outputs.KeyframeRequest, $root.sesame.v1.common.Empty, request, callback);
21039
+ }, "name", { value: "RequestKeyframe" });
21040
+ Object.defineProperty(SesameAPIService.prototype.requestIODeviceList = function requestIODeviceList(request, callback) {
21041
+ return this.rpcCall(requestIODeviceList, $root.sesame.v1.common.Empty, $root.sesame.v1.status.IODeviceListResponse, request, callback);
21042
+ }, "name", { value: "RequestIODeviceList" });
21043
+ return SesameAPIService;
21044
+ }();
21045
+ return rpc;
21046
+ }();
21047
+ v1.wire = function() {
21048
+ const wire = {};
21049
+ wire.FrameType = function() {
21050
+ const valuesById = {}, values = Object.create(valuesById);
21051
+ values[valuesById[0] = "FRAME_TYPE_UNSPECIFIED"] = 0;
21052
+ values[valuesById[1] = "FRAME_TYPE_RPC"] = 1;
21053
+ values[valuesById[2] = "FRAME_TYPE_VIDEO"] = 2;
21054
+ values[valuesById[3] = "FRAME_TYPE_AUDIO"] = 3;
21055
+ values[valuesById[4] = "FRAME_TYPE_MUXED"] = 4;
21056
+ values[valuesById[5] = "FRAME_TYPE_DECODER_DATA"] = 5;
21057
+ values[valuesById[6] = "FRAME_TYPE_DATA"] = 6;
21058
+ return values;
21059
+ }();
21060
+ wire.MediaCodecData = function() {
21061
+ function MediaCodecData2(properties) {
21062
+ if (properties) {
21063
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
21064
+ if (properties[keys[i]] != null)
21065
+ this[keys[i]] = properties[keys[i]];
21066
+ }
21067
+ }
21068
+ MediaCodecData2.prototype.codecType = 0;
21069
+ MediaCodecData2.prototype.sampleRate = 0;
21070
+ MediaCodecData2.prototype.timebaseNum = 0;
21071
+ MediaCodecData2.prototype.timebaseDen = 0;
21072
+ MediaCodecData2.prototype.codecProfile = 0;
21073
+ MediaCodecData2.prototype.codecLevel = 0;
21074
+ MediaCodecData2.prototype.width = 0;
21075
+ MediaCodecData2.prototype.height = 0;
21076
+ MediaCodecData2.prototype.channels = 0;
21077
+ MediaCodecData2.prototype.bitDepth = 0;
21078
+ MediaCodecData2.create = function create(properties) {
21079
+ return new MediaCodecData2(properties);
21080
+ };
21081
+ MediaCodecData2.encode = function encode(message, writer) {
21082
+ if (!writer)
21083
+ writer = $Writer.create();
21084
+ if (message.codecType != null && Object.hasOwnProperty.call(message, "codecType"))
21085
+ writer.uint32(
21086
+ /* id 1, wireType 0 =*/
21087
+ 8
21088
+ ).int32(message.codecType);
21089
+ if (message.sampleRate != null && Object.hasOwnProperty.call(message, "sampleRate"))
21090
+ writer.uint32(
21091
+ /* id 2, wireType 0 =*/
21092
+ 16
21093
+ ).uint32(message.sampleRate);
21094
+ if (message.timebaseNum != null && Object.hasOwnProperty.call(message, "timebaseNum"))
21095
+ writer.uint32(
21096
+ /* id 3, wireType 0 =*/
21097
+ 24
21098
+ ).uint32(message.timebaseNum);
21099
+ if (message.timebaseDen != null && Object.hasOwnProperty.call(message, "timebaseDen"))
21100
+ writer.uint32(
21101
+ /* id 4, wireType 0 =*/
21102
+ 32
21103
+ ).uint32(message.timebaseDen);
21104
+ if (message.codecProfile != null && Object.hasOwnProperty.call(message, "codecProfile"))
21105
+ writer.uint32(
21106
+ /* id 5, wireType 0 =*/
21107
+ 40
21108
+ ).uint32(message.codecProfile);
21109
+ if (message.codecLevel != null && Object.hasOwnProperty.call(message, "codecLevel"))
21110
+ writer.uint32(
21111
+ /* id 6, wireType 0 =*/
21112
+ 48
21113
+ ).uint32(message.codecLevel);
21114
+ if (message.width != null && Object.hasOwnProperty.call(message, "width"))
21115
+ writer.uint32(
21116
+ /* id 7, wireType 0 =*/
21117
+ 56
21118
+ ).uint32(message.width);
21119
+ if (message.height != null && Object.hasOwnProperty.call(message, "height"))
21120
+ writer.uint32(
21121
+ /* id 8, wireType 0 =*/
21122
+ 64
21123
+ ).uint32(message.height);
21124
+ if (message.channels != null && Object.hasOwnProperty.call(message, "channels"))
21125
+ writer.uint32(
21126
+ /* id 9, wireType 0 =*/
21127
+ 72
21128
+ ).uint32(message.channels);
21129
+ if (message.bitDepth != null && Object.hasOwnProperty.call(message, "bitDepth"))
21130
+ writer.uint32(
21131
+ /* id 10, wireType 0 =*/
21132
+ 80
21133
+ ).uint32(message.bitDepth);
21134
+ return writer;
21135
+ };
21136
+ MediaCodecData2.encodeDelimited = function encodeDelimited(message, writer) {
21137
+ return this.encode(message, writer).ldelim();
21138
+ };
21139
+ MediaCodecData2.decode = function decode(reader, length, error) {
21140
+ if (!(reader instanceof $Reader))
21141
+ reader = $Reader.create(reader);
21142
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.wire.MediaCodecData();
21143
+ while (reader.pos < end) {
21144
+ let tag = reader.uint32();
21145
+ if (tag === error)
21146
+ break;
21147
+ switch (tag >>> 3) {
21148
+ case 1: {
21149
+ message.codecType = reader.int32();
21150
+ break;
21151
+ }
21152
+ case 2: {
21153
+ message.sampleRate = reader.uint32();
21154
+ break;
21155
+ }
21156
+ case 3: {
21157
+ message.timebaseNum = reader.uint32();
21158
+ break;
21159
+ }
21160
+ case 4: {
21161
+ message.timebaseDen = reader.uint32();
21162
+ break;
21163
+ }
21164
+ case 5: {
21165
+ message.codecProfile = reader.uint32();
21166
+ break;
21167
+ }
21168
+ case 6: {
21169
+ message.codecLevel = reader.uint32();
21170
+ break;
21171
+ }
21172
+ case 7: {
21173
+ message.width = reader.uint32();
21174
+ break;
21175
+ }
21176
+ case 8: {
21177
+ message.height = reader.uint32();
21178
+ break;
21179
+ }
21180
+ case 9: {
21181
+ message.channels = reader.uint32();
21182
+ break;
21183
+ }
21184
+ case 10: {
21185
+ message.bitDepth = reader.uint32();
21186
+ break;
21187
+ }
21188
+ default:
21189
+ reader.skipType(tag & 7);
21190
+ break;
21191
+ }
21192
+ }
21193
+ return message;
21194
+ };
21195
+ MediaCodecData2.decodeDelimited = function decodeDelimited(reader) {
21196
+ if (!(reader instanceof $Reader))
21197
+ reader = new $Reader(reader);
21198
+ return this.decode(reader, reader.uint32());
21199
+ };
21200
+ MediaCodecData2.verify = function verify(message) {
21201
+ if (typeof message !== "object" || message === null)
21202
+ return "object expected";
21203
+ if (message.codecType != null && message.hasOwnProperty("codecType"))
21204
+ switch (message.codecType) {
21205
+ default:
21206
+ return "codecType: enum value expected";
21207
+ case 0:
21208
+ case 1:
21209
+ case 2:
21210
+ case 3:
21211
+ case 4:
21212
+ case 5:
21213
+ case 6:
21214
+ case 7:
21215
+ case 64:
21216
+ case 65:
21217
+ case 66:
21218
+ case 67:
21219
+ break;
21220
+ }
21221
+ if (message.sampleRate != null && message.hasOwnProperty("sampleRate")) {
21222
+ if (!$util.isInteger(message.sampleRate))
21223
+ return "sampleRate: integer expected";
21224
+ }
21225
+ if (message.timebaseNum != null && message.hasOwnProperty("timebaseNum")) {
21226
+ if (!$util.isInteger(message.timebaseNum))
21227
+ return "timebaseNum: integer expected";
21228
+ }
21229
+ if (message.timebaseDen != null && message.hasOwnProperty("timebaseDen")) {
21230
+ if (!$util.isInteger(message.timebaseDen))
21231
+ return "timebaseDen: integer expected";
21232
+ }
21233
+ if (message.codecProfile != null && message.hasOwnProperty("codecProfile")) {
21234
+ if (!$util.isInteger(message.codecProfile))
21235
+ return "codecProfile: integer expected";
21236
+ }
21237
+ if (message.codecLevel != null && message.hasOwnProperty("codecLevel")) {
21238
+ if (!$util.isInteger(message.codecLevel))
21239
+ return "codecLevel: integer expected";
21240
+ }
21241
+ if (message.width != null && message.hasOwnProperty("width")) {
21242
+ if (!$util.isInteger(message.width))
21243
+ return "width: integer expected";
21244
+ }
21245
+ if (message.height != null && message.hasOwnProperty("height")) {
21246
+ if (!$util.isInteger(message.height))
21247
+ return "height: integer expected";
21248
+ }
21249
+ if (message.channels != null && message.hasOwnProperty("channels")) {
21250
+ if (!$util.isInteger(message.channels))
21251
+ return "channels: integer expected";
21252
+ }
21253
+ if (message.bitDepth != null && message.hasOwnProperty("bitDepth")) {
21254
+ if (!$util.isInteger(message.bitDepth))
21255
+ return "bitDepth: integer expected";
21256
+ }
21257
+ return null;
21258
+ };
21259
+ MediaCodecData2.fromObject = function fromObject(object) {
21260
+ if (object instanceof $root.sesame.v1.wire.MediaCodecData)
21261
+ return object;
21262
+ let message = new $root.sesame.v1.wire.MediaCodecData();
21263
+ switch (object.codecType) {
21264
+ default:
21265
+ if (typeof object.codecType === "number") {
21266
+ message.codecType = object.codecType;
21267
+ break;
21268
+ }
21269
+ break;
21270
+ case "CODEC_TYPE_UNSPECIFIED":
21271
+ case 0:
21272
+ message.codecType = 0;
21273
+ break;
21274
+ case "CODEC_TYPE_VIDEO_VP8":
21275
+ case 1:
21276
+ message.codecType = 1;
21277
+ break;
21278
+ case "CODEC_TYPE_VIDEO_VP9":
21279
+ case 2:
21280
+ message.codecType = 2;
21281
+ break;
21282
+ case "CODEC_TYPE_VIDEO_AVC":
21283
+ case 3:
21284
+ message.codecType = 3;
21285
+ break;
21286
+ case "CODEC_TYPE_VIDEO_HEVC":
21287
+ case 4:
21288
+ message.codecType = 4;
21289
+ break;
21290
+ case "CODEC_TYPE_VIDEO_AV1":
21291
+ case 5:
21292
+ message.codecType = 5;
21293
+ break;
21294
+ case "CODEC_TYPE_VIDEO_PRORES":
21295
+ case 6:
21296
+ message.codecType = 6;
21297
+ break;
21298
+ case "CODEC_TYPE_VIDEO_DNXHR":
21299
+ case 7:
21300
+ message.codecType = 7;
21301
+ break;
21302
+ case "CODEC_TYPE_AUDIO_OPUS":
21303
+ case 64:
21304
+ message.codecType = 64;
21305
+ break;
21306
+ case "CODEC_TYPE_AUDIO_AAC":
21307
+ case 65:
21308
+ message.codecType = 65;
21309
+ break;
21310
+ case "CODEC_TYPE_AUDIO_PCM":
21311
+ case 66:
21312
+ message.codecType = 66;
21313
+ break;
21314
+ case "CODEC_TYPE_AUDIO_PCM_S24LE":
21315
+ case 67:
21316
+ message.codecType = 67;
21317
+ break;
21318
+ }
21319
+ if (object.sampleRate != null)
21320
+ message.sampleRate = object.sampleRate >>> 0;
21321
+ if (object.timebaseNum != null)
21322
+ message.timebaseNum = object.timebaseNum >>> 0;
21323
+ if (object.timebaseDen != null)
21324
+ message.timebaseDen = object.timebaseDen >>> 0;
21325
+ if (object.codecProfile != null)
21326
+ message.codecProfile = object.codecProfile >>> 0;
21327
+ if (object.codecLevel != null)
21328
+ message.codecLevel = object.codecLevel >>> 0;
21329
+ if (object.width != null)
21330
+ message.width = object.width >>> 0;
21331
+ if (object.height != null)
21332
+ message.height = object.height >>> 0;
21333
+ if (object.channels != null)
21334
+ message.channels = object.channels >>> 0;
21335
+ if (object.bitDepth != null)
21336
+ message.bitDepth = object.bitDepth >>> 0;
21337
+ return message;
21338
+ };
21339
+ MediaCodecData2.toObject = function toObject(message, options) {
21340
+ if (!options)
21341
+ options = {};
21342
+ let object = {};
21343
+ if (options.defaults) {
21344
+ object.codecType = options.enums === String ? "CODEC_TYPE_UNSPECIFIED" : 0;
21345
+ object.sampleRate = 0;
21346
+ object.timebaseNum = 0;
21347
+ object.timebaseDen = 0;
21348
+ object.codecProfile = 0;
21349
+ object.codecLevel = 0;
21350
+ object.width = 0;
21351
+ object.height = 0;
21352
+ object.channels = 0;
21353
+ object.bitDepth = 0;
21354
+ }
21355
+ if (message.codecType != null && message.hasOwnProperty("codecType"))
21356
+ 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;
21357
+ if (message.sampleRate != null && message.hasOwnProperty("sampleRate"))
21358
+ object.sampleRate = message.sampleRate;
21359
+ if (message.timebaseNum != null && message.hasOwnProperty("timebaseNum"))
21360
+ object.timebaseNum = message.timebaseNum;
21361
+ if (message.timebaseDen != null && message.hasOwnProperty("timebaseDen"))
21362
+ object.timebaseDen = message.timebaseDen;
21363
+ if (message.codecProfile != null && message.hasOwnProperty("codecProfile"))
21364
+ object.codecProfile = message.codecProfile;
21365
+ if (message.codecLevel != null && message.hasOwnProperty("codecLevel"))
21366
+ object.codecLevel = message.codecLevel;
21367
+ if (message.width != null && message.hasOwnProperty("width"))
21368
+ object.width = message.width;
21369
+ if (message.height != null && message.hasOwnProperty("height"))
21370
+ object.height = message.height;
21371
+ if (message.channels != null && message.hasOwnProperty("channels"))
21372
+ object.channels = message.channels;
21373
+ if (message.bitDepth != null && message.hasOwnProperty("bitDepth"))
21374
+ object.bitDepth = message.bitDepth;
21375
+ return object;
21376
+ };
21377
+ MediaCodecData2.prototype.toJSON = function toJSON() {
21378
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
21379
+ };
21380
+ MediaCodecData2.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
21381
+ if (typeUrlPrefix === void 0) {
21382
+ typeUrlPrefix = "type.googleapis.com";
21383
+ }
21384
+ return typeUrlPrefix + "/sesame.v1.wire.MediaCodecData";
21385
+ };
21386
+ return MediaCodecData2;
21387
+ }();
21388
+ wire.MediaFrameData = function() {
21389
+ function MediaFrameData(properties) {
21390
+ if (properties) {
21391
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
21392
+ if (properties[keys[i]] != null)
21393
+ this[keys[i]] = properties[keys[i]];
21394
+ }
21395
+ }
21396
+ MediaFrameData.prototype.pts = $util.Long ? $util.Long.fromBits(0, 0, true) : 0;
21397
+ MediaFrameData.prototype.keyframe = false;
21398
+ MediaFrameData.prototype.codecData = null;
21399
+ MediaFrameData.create = function create(properties) {
21400
+ return new MediaFrameData(properties);
21401
+ };
21402
+ MediaFrameData.encode = function encode(message, writer) {
21403
+ if (!writer)
21404
+ writer = $Writer.create();
21405
+ if (message.pts != null && Object.hasOwnProperty.call(message, "pts"))
21406
+ writer.uint32(
21407
+ /* id 1, wireType 0 =*/
21408
+ 8
21409
+ ).uint64(message.pts);
21410
+ if (message.keyframe != null && Object.hasOwnProperty.call(message, "keyframe"))
21411
+ writer.uint32(
21412
+ /* id 2, wireType 0 =*/
21413
+ 16
21414
+ ).bool(message.keyframe);
21415
+ if (message.codecData != null && Object.hasOwnProperty.call(message, "codecData"))
21416
+ $root.sesame.v1.wire.MediaCodecData.encode(message.codecData, writer.uint32(
21417
+ /* id 3, wireType 2 =*/
21418
+ 26
21419
+ ).fork()).ldelim();
21420
+ return writer;
21421
+ };
21422
+ MediaFrameData.encodeDelimited = function encodeDelimited(message, writer) {
21423
+ return this.encode(message, writer).ldelim();
21424
+ };
21425
+ MediaFrameData.decode = function decode(reader, length, error) {
21426
+ if (!(reader instanceof $Reader))
21427
+ reader = $Reader.create(reader);
21428
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.wire.MediaFrameData();
21429
+ while (reader.pos < end) {
21430
+ let tag = reader.uint32();
21431
+ if (tag === error)
21432
+ break;
21433
+ switch (tag >>> 3) {
21434
+ case 1: {
21435
+ message.pts = reader.uint64();
21436
+ break;
21437
+ }
21438
+ case 2: {
21439
+ message.keyframe = reader.bool();
21440
+ break;
21441
+ }
21442
+ case 3: {
21443
+ message.codecData = $root.sesame.v1.wire.MediaCodecData.decode(reader, reader.uint32());
21444
+ break;
21445
+ }
21446
+ default:
21447
+ reader.skipType(tag & 7);
21448
+ break;
21449
+ }
21450
+ }
21451
+ return message;
21452
+ };
21453
+ MediaFrameData.decodeDelimited = function decodeDelimited(reader) {
21454
+ if (!(reader instanceof $Reader))
21455
+ reader = new $Reader(reader);
21456
+ return this.decode(reader, reader.uint32());
21457
+ };
21458
+ MediaFrameData.verify = function verify(message) {
21459
+ if (typeof message !== "object" || message === null)
21460
+ return "object expected";
21461
+ if (message.pts != null && message.hasOwnProperty("pts")) {
21462
+ if (!$util.isInteger(message.pts) && !(message.pts && $util.isInteger(message.pts.low) && $util.isInteger(message.pts.high)))
21463
+ return "pts: integer|Long expected";
21464
+ }
21465
+ if (message.keyframe != null && message.hasOwnProperty("keyframe")) {
21466
+ if (typeof message.keyframe !== "boolean")
21467
+ return "keyframe: boolean expected";
21468
+ }
21469
+ if (message.codecData != null && message.hasOwnProperty("codecData")) {
21470
+ let error = $root.sesame.v1.wire.MediaCodecData.verify(message.codecData);
21471
+ if (error)
21472
+ return "codecData." + error;
21473
+ }
21474
+ return null;
21475
+ };
21476
+ MediaFrameData.fromObject = function fromObject(object) {
21477
+ if (object instanceof $root.sesame.v1.wire.MediaFrameData)
21478
+ return object;
21479
+ let message = new $root.sesame.v1.wire.MediaFrameData();
21480
+ if (object.pts != null) {
21481
+ if ($util.Long)
21482
+ (message.pts = $util.Long.fromValue(object.pts)).unsigned = true;
21483
+ else if (typeof object.pts === "string")
21484
+ message.pts = parseInt(object.pts, 10);
21485
+ else if (typeof object.pts === "number")
21486
+ message.pts = object.pts;
21487
+ else if (typeof object.pts === "object")
21488
+ message.pts = new $util.LongBits(object.pts.low >>> 0, object.pts.high >>> 0).toNumber(true);
21489
+ }
21490
+ if (object.keyframe != null)
21491
+ message.keyframe = Boolean(object.keyframe);
21492
+ if (object.codecData != null) {
21493
+ if (typeof object.codecData !== "object")
21494
+ throw TypeError(".sesame.v1.wire.MediaFrameData.codecData: object expected");
21495
+ message.codecData = $root.sesame.v1.wire.MediaCodecData.fromObject(object.codecData);
21496
+ }
20797
21497
  return message;
20798
21498
  };
20799
- Response2.toObject = function toObject(message, options) {
21499
+ MediaFrameData.toObject = function toObject(message, options) {
20800
21500
  if (!options)
20801
21501
  options = {};
20802
21502
  let object = {};
20803
21503
  if (options.defaults) {
20804
- object.seq = 0;
20805
- object.ok = false;
20806
- if (options.bytes === String)
20807
- object.payload = "";
20808
- else {
20809
- object.payload = [];
20810
- if (options.bytes !== Array)
20811
- object.payload = $util.newBuffer(object.payload);
20812
- }
20813
- object.error = "";
21504
+ if ($util.Long) {
21505
+ let long = new $util.Long(0, 0, true);
21506
+ object.pts = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
21507
+ } else
21508
+ object.pts = options.longs === String ? "0" : 0;
21509
+ object.keyframe = false;
21510
+ object.codecData = null;
20814
21511
  }
20815
- if (message.seq != null && message.hasOwnProperty("seq"))
20816
- object.seq = message.seq;
20817
- if (message.ok != null && message.hasOwnProperty("ok"))
20818
- object.ok = message.ok;
20819
- if (message.payload != null && message.hasOwnProperty("payload"))
20820
- 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;
20821
- if (message.error != null && message.hasOwnProperty("error"))
20822
- object.error = message.error;
21512
+ if (message.pts != null && message.hasOwnProperty("pts"))
21513
+ if (typeof message.pts === "number")
21514
+ object.pts = options.longs === String ? String(message.pts) : message.pts;
21515
+ else
21516
+ 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;
21517
+ if (message.keyframe != null && message.hasOwnProperty("keyframe"))
21518
+ object.keyframe = message.keyframe;
21519
+ if (message.codecData != null && message.hasOwnProperty("codecData"))
21520
+ object.codecData = $root.sesame.v1.wire.MediaCodecData.toObject(message.codecData, options);
20823
21521
  return object;
20824
21522
  };
20825
- Response2.prototype.toJSON = function toJSON() {
21523
+ MediaFrameData.prototype.toJSON = function toJSON() {
20826
21524
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
20827
21525
  };
20828
- Response2.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
21526
+ MediaFrameData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
20829
21527
  if (typeUrlPrefix === void 0) {
20830
21528
  typeUrlPrefix = "type.googleapis.com";
20831
21529
  }
20832
- return typeUrlPrefix + "/sesame.v1.rpc.Response";
21530
+ return typeUrlPrefix + "/sesame.v1.wire.MediaFrameData";
20833
21531
  };
20834
- return Response2;
21532
+ return MediaFrameData;
20835
21533
  }();
20836
- rpc.Event = function() {
20837
- function Event2(properties) {
21534
+ wire.FrameHeader = function() {
21535
+ function FrameHeader2(properties) {
20838
21536
  if (properties) {
20839
21537
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
20840
21538
  if (properties[keys[i]] != null)
20841
21539
  this[keys[i]] = properties[keys[i]];
20842
21540
  }
20843
21541
  }
20844
- Event2.prototype.topic = 0;
20845
- Event2.prototype.payload = $util.newBuffer([]);
20846
- Event2.create = function create(properties) {
20847
- return new Event2(properties);
21542
+ FrameHeader2.prototype.type = 0;
21543
+ FrameHeader2.prototype.routingMetadata = "";
21544
+ FrameHeader2.prototype.media = null;
21545
+ let $oneOfFields;
21546
+ Object.defineProperty(FrameHeader2.prototype, "typeData", {
21547
+ get: $util.oneOfGetter($oneOfFields = ["media"]),
21548
+ set: $util.oneOfSetter($oneOfFields)
21549
+ });
21550
+ FrameHeader2.create = function create(properties) {
21551
+ return new FrameHeader2(properties);
20848
21552
  };
20849
- Event2.encode = function encode(message, writer) {
21553
+ FrameHeader2.encode = function encode(message, writer) {
20850
21554
  if (!writer)
20851
21555
  writer = $Writer.create();
20852
- if (message.topic != null && Object.hasOwnProperty.call(message, "topic"))
21556
+ if (message.type != null && Object.hasOwnProperty.call(message, "type"))
20853
21557
  writer.uint32(
20854
21558
  /* id 1, wireType 0 =*/
20855
21559
  8
20856
- ).int32(message.topic);
20857
- if (message.payload != null && Object.hasOwnProperty.call(message, "payload"))
21560
+ ).int32(message.type);
21561
+ if (message.routingMetadata != null && Object.hasOwnProperty.call(message, "routingMetadata"))
20858
21562
  writer.uint32(
20859
- /* id 2, wireType 2 =*/
20860
- 18
20861
- ).bytes(message.payload);
21563
+ /* id 6, wireType 2 =*/
21564
+ 50
21565
+ ).string(message.routingMetadata);
21566
+ if (message.media != null && Object.hasOwnProperty.call(message, "media"))
21567
+ $root.sesame.v1.wire.MediaFrameData.encode(message.media, writer.uint32(
21568
+ /* id 7, wireType 2 =*/
21569
+ 58
21570
+ ).fork()).ldelim();
20862
21571
  return writer;
20863
21572
  };
20864
- Event2.encodeDelimited = function encodeDelimited(message, writer) {
21573
+ FrameHeader2.encodeDelimited = function encodeDelimited(message, writer) {
20865
21574
  return this.encode(message, writer).ldelim();
20866
21575
  };
20867
- Event2.decode = function decode(reader, length, error) {
21576
+ FrameHeader2.decode = function decode(reader, length, error) {
20868
21577
  if (!(reader instanceof $Reader))
20869
21578
  reader = $Reader.create(reader);
20870
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.rpc.Event();
21579
+ let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.wire.FrameHeader();
20871
21580
  while (reader.pos < end) {
20872
21581
  let tag = reader.uint32();
20873
21582
  if (tag === error)
20874
21583
  break;
20875
21584
  switch (tag >>> 3) {
20876
21585
  case 1: {
20877
- message.topic = reader.int32();
21586
+ message.type = reader.int32();
20878
21587
  break;
20879
21588
  }
20880
- case 2: {
20881
- message.payload = reader.bytes();
21589
+ case 6: {
21590
+ message.routingMetadata = reader.string();
21591
+ break;
21592
+ }
21593
+ case 7: {
21594
+ message.media = $root.sesame.v1.wire.MediaFrameData.decode(reader, reader.uint32());
20882
21595
  break;
20883
21596
  }
20884
21597
  default:
@@ -20888,18 +21601,19 @@ var sesame = $root.sesame = (() => {
20888
21601
  }
20889
21602
  return message;
20890
21603
  };
20891
- Event2.decodeDelimited = function decodeDelimited(reader) {
21604
+ FrameHeader2.decodeDelimited = function decodeDelimited(reader) {
20892
21605
  if (!(reader instanceof $Reader))
20893
21606
  reader = new $Reader(reader);
20894
21607
  return this.decode(reader, reader.uint32());
20895
21608
  };
20896
- Event2.verify = function verify(message) {
21609
+ FrameHeader2.verify = function verify(message) {
20897
21610
  if (typeof message !== "object" || message === null)
20898
21611
  return "object expected";
20899
- if (message.topic != null && message.hasOwnProperty("topic"))
20900
- switch (message.topic) {
21612
+ let properties = {};
21613
+ if (message.type != null && message.hasOwnProperty("type"))
21614
+ switch (message.type) {
20901
21615
  default:
20902
- return "topic: enum value expected";
21616
+ return "type: enum value expected";
20903
21617
  case 0:
20904
21618
  case 1:
20905
21619
  case 2:
@@ -20909,150 +21623,100 @@ var sesame = $root.sesame = (() => {
20909
21623
  case 6:
20910
21624
  break;
20911
21625
  }
20912
- if (message.payload != null && message.hasOwnProperty("payload")) {
20913
- if (!(message.payload && typeof message.payload.length === "number" || $util.isString(message.payload)))
20914
- return "payload: buffer expected";
21626
+ if (message.routingMetadata != null && message.hasOwnProperty("routingMetadata")) {
21627
+ if (!$util.isString(message.routingMetadata))
21628
+ return "routingMetadata: string expected";
21629
+ }
21630
+ if (message.media != null && message.hasOwnProperty("media")) {
21631
+ properties.typeData = 1;
21632
+ {
21633
+ let error = $root.sesame.v1.wire.MediaFrameData.verify(message.media);
21634
+ if (error)
21635
+ return "media." + error;
21636
+ }
20915
21637
  }
20916
21638
  return null;
20917
21639
  };
20918
- Event2.fromObject = function fromObject(object) {
20919
- if (object instanceof $root.sesame.v1.rpc.Event)
21640
+ FrameHeader2.fromObject = function fromObject(object) {
21641
+ if (object instanceof $root.sesame.v1.wire.FrameHeader)
20920
21642
  return object;
20921
- let message = new $root.sesame.v1.rpc.Event();
20922
- switch (object.topic) {
21643
+ let message = new $root.sesame.v1.wire.FrameHeader();
21644
+ switch (object.type) {
20923
21645
  default:
20924
- if (typeof object.topic === "number") {
20925
- message.topic = object.topic;
21646
+ if (typeof object.type === "number") {
21647
+ message.type = object.type;
20926
21648
  break;
20927
21649
  }
20928
21650
  break;
20929
- case "EVENT_TOPIC_UNSPECIFIED":
21651
+ case "FRAME_TYPE_UNSPECIFIED":
20930
21652
  case 0:
20931
- message.topic = 0;
21653
+ message.type = 0;
20932
21654
  break;
20933
- case "EVENT_TOPIC_ERROR":
21655
+ case "FRAME_TYPE_RPC":
20934
21656
  case 1:
20935
- message.topic = 1;
21657
+ message.type = 1;
20936
21658
  break;
20937
- case "EVENT_TOPIC_TRANSPORT":
21659
+ case "FRAME_TYPE_VIDEO":
20938
21660
  case 2:
20939
- message.topic = 2;
21661
+ message.type = 2;
20940
21662
  break;
20941
- case "EVENT_TOPIC_CALLBACK":
21663
+ case "FRAME_TYPE_AUDIO":
20942
21664
  case 3:
20943
- message.topic = 3;
21665
+ message.type = 3;
20944
21666
  break;
20945
- case "EVENT_TOPIC_PLAYLIST_EXPORT":
21667
+ case "FRAME_TYPE_MUXED":
20946
21668
  case 4:
20947
- message.topic = 4;
21669
+ message.type = 4;
20948
21670
  break;
20949
- case "EVENT_TOPIC_CLIP_IMPORT":
21671
+ case "FRAME_TYPE_DECODER_DATA":
20950
21672
  case 5:
20951
- message.topic = 5;
21673
+ message.type = 5;
20952
21674
  break;
20953
- case "EVENT_TOPIC_RECORDER":
21675
+ case "FRAME_TYPE_DATA":
20954
21676
  case 6:
20955
- message.topic = 6;
21677
+ message.type = 6;
20956
21678
  break;
20957
21679
  }
20958
- if (object.payload != null) {
20959
- if (typeof object.payload === "string")
20960
- $util.base64.decode(object.payload, message.payload = $util.newBuffer($util.base64.length(object.payload)), 0);
20961
- else if (object.payload.length >= 0)
20962
- message.payload = object.payload;
21680
+ if (object.routingMetadata != null)
21681
+ message.routingMetadata = String(object.routingMetadata);
21682
+ if (object.media != null) {
21683
+ if (typeof object.media !== "object")
21684
+ throw TypeError(".sesame.v1.wire.FrameHeader.media: object expected");
21685
+ message.media = $root.sesame.v1.wire.MediaFrameData.fromObject(object.media);
20963
21686
  }
20964
21687
  return message;
20965
21688
  };
20966
- Event2.toObject = function toObject(message, options) {
21689
+ FrameHeader2.toObject = function toObject(message, options) {
20967
21690
  if (!options)
20968
21691
  options = {};
20969
21692
  let object = {};
20970
21693
  if (options.defaults) {
20971
- object.topic = options.enums === String ? "EVENT_TOPIC_UNSPECIFIED" : 0;
20972
- if (options.bytes === String)
20973
- object.payload = "";
20974
- else {
20975
- object.payload = [];
20976
- if (options.bytes !== Array)
20977
- object.payload = $util.newBuffer(object.payload);
20978
- }
21694
+ object.type = options.enums === String ? "FRAME_TYPE_UNSPECIFIED" : 0;
21695
+ object.routingMetadata = "";
21696
+ }
21697
+ if (message.type != null && message.hasOwnProperty("type"))
21698
+ 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;
21699
+ if (message.routingMetadata != null && message.hasOwnProperty("routingMetadata"))
21700
+ object.routingMetadata = message.routingMetadata;
21701
+ if (message.media != null && message.hasOwnProperty("media")) {
21702
+ object.media = $root.sesame.v1.wire.MediaFrameData.toObject(message.media, options);
21703
+ if (options.oneofs)
21704
+ object.typeData = "media";
20979
21705
  }
20980
- if (message.topic != null && message.hasOwnProperty("topic"))
20981
- 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;
20982
- if (message.payload != null && message.hasOwnProperty("payload"))
20983
- 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;
20984
21706
  return object;
20985
21707
  };
20986
- Event2.prototype.toJSON = function toJSON() {
21708
+ FrameHeader2.prototype.toJSON = function toJSON() {
20987
21709
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
20988
21710
  };
20989
- Event2.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
21711
+ FrameHeader2.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
20990
21712
  if (typeUrlPrefix === void 0) {
20991
21713
  typeUrlPrefix = "type.googleapis.com";
20992
21714
  }
20993
- return typeUrlPrefix + "/sesame.v1.rpc.Event";
20994
- };
20995
- return Event2;
20996
- }();
20997
- rpc.SesameAPIService = function() {
20998
- function SesameAPIService(rpcImpl, requestDelimited, responseDelimited) {
20999
- $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
21000
- }
21001
- (SesameAPIService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SesameAPIService;
21002
- SesameAPIService.create = function create(rpcImpl, requestDelimited, responseDelimited) {
21003
- return new this(rpcImpl, requestDelimited, responseDelimited);
21715
+ return typeUrlPrefix + "/sesame.v1.wire.FrameHeader";
21004
21716
  };
21005
- Object.defineProperty(SesameAPIService.prototype.executeCommandList = function executeCommandList(request, callback) {
21006
- return this.rpcCall(executeCommandList, $root.sesame.v1.commands.CommandList, $root.sesame.v1.commands.CommandExecutionResponse, request, callback);
21007
- }, "name", { value: "ExecuteCommandList" });
21008
- Object.defineProperty(SesameAPIService.prototype.updateSubscriptions = function updateSubscriptions(request, callback) {
21009
- return this.rpcCall(updateSubscriptions, $root.sesame.v1.status.SubscriptionRequest, $root.sesame.v1.common.Empty, request, callback);
21010
- }, "name", { value: "UpdateSubscriptions" });
21011
- Object.defineProperty(SesameAPIService.prototype.notImplemented = function notImplemented(request, callback) {
21012
- return this.rpcCall(notImplemented, $root.sesame.v1.common.Empty, $root.sesame.v1.common.Empty, request, callback);
21013
- }, "name", { value: "NotImplemented" });
21014
- Object.defineProperty(SesameAPIService.prototype.requestEvents = function requestEvents(request, callback) {
21015
- return this.rpcCall(requestEvents, $root.sesame.v1.common.Empty, $root.sesame.v1.status.Event, request, callback);
21016
- }, "name", { value: "RequestEvents" });
21017
- Object.defineProperty(SesameAPIService.prototype.requestStatus = function requestStatus(request, callback) {
21018
- return this.rpcCall(requestStatus, $root.sesame.v1.common.Empty, $root.sesame.v1.status.Status, request, callback);
21019
- }, "name", { value: "RequestStatus" });
21020
- Object.defineProperty(SesameAPIService.prototype.requestRecorderOperation = function requestRecorderOperation(request, callback) {
21021
- return this.rpcCall(requestRecorderOperation, $root.sesame.v1.recorder.RecorderRequest, $root.sesame.v1.recorder.RecorderResponse, request, callback);
21022
- }, "name", { value: "RequestRecorderOperation" });
21023
- Object.defineProperty(SesameAPIService.prototype.requestPlaylistExportStart = function requestPlaylistExportStart(request, callback) {
21024
- return this.rpcCall(requestPlaylistExportStart, $root.sesame.v1.jobs.ExportStartRequest, $root.sesame.v1.jobs.JobStatusResponse, request, callback);
21025
- }, "name", { value: "RequestPlaylistExportStart" });
21026
- Object.defineProperty(SesameAPIService.prototype.requestPlaylistExportAbort = function requestPlaylistExportAbort(request, callback) {
21027
- return this.rpcCall(requestPlaylistExportAbort, $root.sesame.v1.jobs.ExportAbortRequest, $root.sesame.v1.jobs.JobStatusResponse, request, callback);
21028
- }, "name", { value: "RequestPlaylistExportAbort" });
21029
- Object.defineProperty(SesameAPIService.prototype.requestPlaylistExportStatus = function requestPlaylistExportStatus(request, callback) {
21030
- return this.rpcCall(requestPlaylistExportStatus, $root.sesame.v1.jobs.ExportStatusRequest, $root.sesame.v1.jobs.JobStatusResponse, request, callback);
21031
- }, "name", { value: "RequestPlaylistExportStatus" });
21032
- Object.defineProperty(SesameAPIService.prototype.requestPlaylistExportList = function requestPlaylistExportList(request, callback) {
21033
- return this.rpcCall(requestPlaylistExportList, $root.sesame.v1.jobs.ExportListRequest, $root.sesame.v1.jobs.JobListResponse, request, callback);
21034
- }, "name", { value: "RequestPlaylistExportList" });
21035
- Object.defineProperty(SesameAPIService.prototype.requestClipImportStart = function requestClipImportStart(request, callback) {
21036
- return this.rpcCall(requestClipImportStart, $root.sesame.v1.jobs.ImportStartRequest, $root.sesame.v1.jobs.JobStatusResponse, request, callback);
21037
- }, "name", { value: "RequestClipImportStart" });
21038
- Object.defineProperty(SesameAPIService.prototype.requestClipImportAbort = function requestClipImportAbort(request, callback) {
21039
- return this.rpcCall(requestClipImportAbort, $root.sesame.v1.jobs.ImportAbortRequest, $root.sesame.v1.jobs.JobStatusResponse, request, callback);
21040
- }, "name", { value: "RequestClipImportAbort" });
21041
- Object.defineProperty(SesameAPIService.prototype.requestClipImportStatus = function requestClipImportStatus(request, callback) {
21042
- return this.rpcCall(requestClipImportStatus, $root.sesame.v1.jobs.ImportStatusRequest, $root.sesame.v1.jobs.JobStatusResponse, request, callback);
21043
- }, "name", { value: "RequestClipImportStatus" });
21044
- Object.defineProperty(SesameAPIService.prototype.requestClipImportList = function requestClipImportList(request, callback) {
21045
- return this.rpcCall(requestClipImportList, $root.sesame.v1.jobs.ImportListRequest, $root.sesame.v1.jobs.JobListResponse, request, callback);
21046
- }, "name", { value: "RequestClipImportList" });
21047
- Object.defineProperty(SesameAPIService.prototype.requestKeyframe = function requestKeyframe(request, callback) {
21048
- return this.rpcCall(requestKeyframe, $root.sesame.v1.outputs.KeyframeRequest, $root.sesame.v1.common.Empty, request, callback);
21049
- }, "name", { value: "RequestKeyframe" });
21050
- Object.defineProperty(SesameAPIService.prototype.requestIODeviceList = function requestIODeviceList(request, callback) {
21051
- return this.rpcCall(requestIODeviceList, $root.sesame.v1.common.Empty, $root.sesame.v1.status.IODeviceListResponse, request, callback);
21052
- }, "name", { value: "RequestIODeviceList" });
21053
- return SesameAPIService;
21717
+ return FrameHeader2;
21054
21718
  }();
21055
- return rpc;
21719
+ return wire;
21056
21720
  }();
21057
21721
  return v1;
21058
21722
  }();
@@ -21451,8 +22115,8 @@ var RPCClient = class extends EventEmitter {
21451
22115
  } else {
21452
22116
  throw new Error("Unsupported RPC message payload");
21453
22117
  }
21454
- } catch (cause) {
21455
- const error = new Error("got invalid message");
22118
+ } catch (err) {
22119
+ const error = new Error(`Got invalid message: ${err instanceof Error ? err.message : String(err)}`);
21456
22120
  this.errorHandler(error);
21457
22121
  }
21458
22122
  };
@@ -21461,10 +22125,33 @@ var RPCClient = class extends EventEmitter {
21461
22125
  this.connection.on("rpc", (data) => this.messageHandler(data));
21462
22126
  this.connection.on("error", this.errorHandler);
21463
22127
  this.options = options;
21464
- this.service = service.create(this.rpcImpl);
22128
+ this.service = this.wrapServicePromises(service.create(this.rpcImpl));
21465
22129
  this.eventTypes = options.eventTypes || {};
21466
22130
  this.sendTimeout = options.sendTimeout || 5 * 1e3;
21467
22131
  }
22132
+ /**
22133
+ * Wraps service method calls to attach a rejection handler on all returned
22134
+ * promises. This prevents unhandled promise rejections (e.g. from timeouts
22135
+ * while disconnected) from crashing the host process. Callers can still
22136
+ * catch errors normally via await / .catch().
22137
+ */
22138
+ wrapServicePromises(service) {
22139
+ const self = this;
22140
+ return new Proxy(service, {
22141
+ get(target, prop) {
22142
+ const value = target[prop];
22143
+ if (typeof value !== "function") return value;
22144
+ return function(...args) {
22145
+ const result = value.apply(target, args);
22146
+ if (result != null && typeof result.catch === "function") {
22147
+ result.catch(() => {
22148
+ });
22149
+ }
22150
+ return result;
22151
+ };
22152
+ }
22153
+ });
22154
+ }
21468
22155
  async flushMessageBuffer() {
21469
22156
  const messages = [];
21470
22157
  for (const seq in this.messageBuffer) {
@@ -21493,7 +22180,8 @@ var RPCClient = class extends EventEmitter {
21493
22180
  eventHandler(event) {
21494
22181
  const topic = event.topic ?? 0;
21495
22182
  if (topic === sesame.v1.common.EventTopic.EVENT_TOPIC_UNSPECIFIED) {
21496
- throw new Error(`Unknown event topic: ${event.topic}`);
22183
+ log.warn(`Ignoring event with unspecified topic: ${event.topic}`);
22184
+ return;
21497
22185
  }
21498
22186
  const type = this.eventTypes[topic];
21499
22187
  let payload;
@@ -21503,8 +22191,8 @@ var RPCClient = class extends EventEmitter {
21503
22191
  try {
21504
22192
  payload = type.decode(event.payload);
21505
22193
  object = type.toObject(payload, { longs: Number });
21506
- } catch (cause) {
21507
- const error = new Error("could not decode event payload");
22194
+ } catch (err) {
22195
+ const error = new Error(`Could not decode event payload: ${err instanceof Error ? err.message : String(err)}`);
21508
22196
  this.errorHandler(error);
21509
22197
  return;
21510
22198
  }
@@ -21519,255 +22207,58 @@ var RPCClient = class extends EventEmitter {
21519
22207
  // src/sesame-connection.ts
21520
22208
  import { EventEmitter as EventEmitter2 } from "events";
21521
22209
 
21522
- // src/sesame-binary-protocol.ts
21523
- var PROTOCOL_MAGIC = 1297302867;
21524
- var PROTOCOL_VERSION = 1;
21525
- var HEADER_DATA_SIZE = 32;
21526
- var HEADER_CODEC_DATA_SIZE = 24;
21527
- var HEADER_METADATA_SIZE = 64;
21528
- var FLAG_HAS_CODEC_DATA = 1 << 0;
21529
- var FLAG_HAS_METADATA = 1 << 1;
21530
- var FLAG_IS_KEYFRAME = 1 << 2;
21531
- var PacketType = /* @__PURE__ */ ((PacketType2) => {
21532
- PacketType2[PacketType2["VIDEO_FRAME"] = 1] = "VIDEO_FRAME";
21533
- PacketType2[PacketType2["AUDIO_FRAME"] = 2] = "AUDIO_FRAME";
21534
- PacketType2[PacketType2["RPC"] = 3] = "RPC";
21535
- PacketType2[PacketType2["MUXED_DATA"] = 4] = "MUXED_DATA";
21536
- PacketType2[PacketType2["DECODER_DATA"] = 5] = "DECODER_DATA";
21537
- return PacketType2;
21538
- })(PacketType || {});
21539
- var CodecType = /* @__PURE__ */ ((CodecType2) => {
21540
- CodecType2[CodecType2["VIDEO_VP8"] = 1] = "VIDEO_VP8";
21541
- CodecType2[CodecType2["VIDEO_VP9"] = 2] = "VIDEO_VP9";
21542
- CodecType2[CodecType2["VIDEO_AVC"] = 3] = "VIDEO_AVC";
21543
- CodecType2[CodecType2["VIDEO_HEVC"] = 4] = "VIDEO_HEVC";
21544
- CodecType2[CodecType2["VIDEO_AV1"] = 5] = "VIDEO_AV1";
21545
- CodecType2[CodecType2["AUDIO_OPUS"] = 64] = "AUDIO_OPUS";
21546
- CodecType2[CodecType2["AUDIO_AAC"] = 65] = "AUDIO_AAC";
21547
- CodecType2[CodecType2["AUDIO_PCM"] = 66] = "AUDIO_PCM";
21548
- return CodecType2;
21549
- })(CodecType || {});
21550
- var SesameBinaryProtocol = class {
21551
- /**
21552
- * Initialize a header data structure with proper defaults
21553
- */
21554
- static initHeader(type, flags, pts, id) {
21555
- return {
21556
- magic: PROTOCOL_MAGIC,
21557
- version: PROTOCOL_VERSION,
21558
- header_size: this.calculateHeaderSize(flags),
21559
- type,
21560
- flags,
21561
- pts,
21562
- id,
21563
- reserved: 0
21564
- // Always zero reserved fields
21565
- };
21566
- }
21567
- /**
21568
- * Calculate the total header size based on flags
21569
- */
21570
- static calculateHeaderSize(flags) {
21571
- let size = HEADER_DATA_SIZE;
21572
- if (flags & FLAG_HAS_METADATA) {
21573
- size += HEADER_METADATA_SIZE;
21574
- }
21575
- if (flags & FLAG_HAS_CODEC_DATA) {
21576
- size += HEADER_CODEC_DATA_SIZE;
21577
- }
21578
- return size;
21579
- }
21580
- /**
21581
- * Validate a header structure
21582
- */
21583
- static validateHeader(header, totalSize) {
21584
- if (header.magic !== PROTOCOL_MAGIC) {
21585
- return false;
21586
- }
21587
- if (header.version !== PROTOCOL_VERSION) {
21588
- return false;
21589
- }
21590
- const expectedHeaderSize = this.calculateHeaderSize(header.flags);
21591
- if (header.header_size !== expectedHeaderSize) {
21592
- return false;
21593
- }
21594
- if (totalSize < header.header_size) {
21595
- return false;
21596
- }
21597
- return true;
21598
- }
22210
+ // src/sesame-wire-protocol.ts
22211
+ var FrameType = sesame.v1.wire.FrameType;
22212
+ var FrameHeader = sesame.v1.wire.FrameHeader;
22213
+ var MediaCodecData = sesame.v1.wire.MediaCodecData;
22214
+ var CodecType = sesame.v1.common.CodecType;
22215
+ var PREFIX_SIZE = 4;
22216
+ var WireProtocol = class {
21599
22217
  /**
21600
- * Serialize data into a Uint8Array buffer
22218
+ * Serialize a wire frame: 4-byte LE header_size + protobuf FrameHeader + payload.
21601
22219
  */
21602
- static serialize(header, metadata = null, codecData = null, payload = null) {
21603
- const includeMetadata = metadata !== null && header.flags & FLAG_HAS_METADATA;
21604
- const includeCodec = codecData !== null && header.flags & FLAG_HAS_CODEC_DATA;
21605
- let totalSize = HEADER_DATA_SIZE;
21606
- if (includeMetadata) totalSize += HEADER_METADATA_SIZE;
21607
- if (includeCodec) totalSize += HEADER_CODEC_DATA_SIZE;
21608
- if (payload) totalSize += payload.length;
21609
- header.header_size = totalSize - (payload ? payload.length : 0);
21610
- const buffer = new ArrayBuffer(totalSize);
21611
- const view = new DataView(buffer);
21612
- let offset = 0;
21613
- view.setUint32(offset, header.magic, true);
21614
- offset += 4;
21615
- view.setUint32(offset, header.flags, true);
21616
- offset += 4;
21617
- view.setBigUint64(offset, header.pts, true);
21618
- offset += 8;
21619
- view.setBigUint64(offset, header.id, true);
21620
- offset += 8;
21621
- view.setUint16(offset, header.version, true);
21622
- offset += 2;
21623
- view.setUint16(offset, header.header_size, true);
21624
- offset += 2;
21625
- view.setUint16(offset, header.type, true);
21626
- offset += 2;
21627
- view.setUint16(offset, header.reserved, true);
21628
- offset += 2;
21629
- if (includeMetadata && metadata) {
21630
- const metadataBytes = this.stringToFixedBytes(metadata.metadata, 64);
21631
- new Uint8Array(buffer, offset, 64).set(metadataBytes);
21632
- offset += 64;
21633
- }
21634
- if (includeCodec && codecData) {
21635
- view.setUint32(offset, codecData.sample_rate, true);
21636
- offset += 4;
21637
- view.setUint32(offset, codecData.timebase_num, true);
21638
- offset += 4;
21639
- view.setUint32(offset, codecData.timebase_den, true);
21640
- offset += 4;
21641
- view.setUint16(offset, codecData.codec_profile, true);
21642
- offset += 2;
21643
- view.setUint16(offset, codecData.codec_level, true);
21644
- offset += 2;
21645
- view.setUint16(offset, codecData.width, true);
21646
- offset += 2;
21647
- view.setUint16(offset, codecData.height, true);
21648
- offset += 2;
21649
- view.setUint8(offset, codecData.codec_type);
21650
- offset += 1;
21651
- view.setUint8(offset, codecData.channels);
21652
- offset += 1;
21653
- view.setUint8(offset, codecData.bit_depth);
21654
- offset += 1;
21655
- view.setUint8(offset, codecData.reserved);
21656
- offset += 1;
21657
- }
21658
- if (payload && payload.length > 0) {
21659
- new Uint8Array(buffer, offset).set(payload);
22220
+ static serialize(header, payload) {
22221
+ const headerBytes = sesame.v1.wire.FrameHeader.encode(header).finish();
22222
+ const headerSize = headerBytes.length;
22223
+ const payloadSize = payload ? payload.length : 0;
22224
+ const total = PREFIX_SIZE + headerSize + payloadSize;
22225
+ const buffer = new Uint8Array(total);
22226
+ const view = new DataView(buffer.buffer);
22227
+ view.setUint32(0, headerSize, true);
22228
+ buffer.set(headerBytes, PREFIX_SIZE);
22229
+ if (payload && payloadSize > 0) {
22230
+ buffer.set(payload, PREFIX_SIZE + headerSize);
21660
22231
  }
21661
- return new Uint8Array(buffer);
22232
+ return buffer;
21662
22233
  }
21663
22234
  /**
21664
- * Parse incoming binary data
22235
+ * Parse an incoming wire frame.
21665
22236
  */
21666
- static parseData(data) {
21667
- const result = {
21668
- valid: false,
21669
- header: null,
21670
- metadata: null,
21671
- codec_data: null,
21672
- payload: null,
21673
- payload_size: 0
21674
- };
21675
- if (!data || data.length < 36) {
21676
- return result;
21677
- }
21678
- const view = new DataView(data.buffer, data.byteOffset);
21679
- let offset = 0;
21680
- const header = {
21681
- magic: view.getUint32(offset, true),
21682
- flags: view.getUint32(offset + 4, true),
21683
- pts: view.getBigUint64(offset + 8, true),
21684
- id: view.getBigUint64(offset + 16, true),
21685
- version: view.getUint16(offset + 24, true),
21686
- header_size: view.getUint16(offset + 26, true),
21687
- type: view.getUint16(offset + 28, true),
21688
- reserved: view.getUint16(offset + 30, true)
21689
- };
21690
- offset += HEADER_DATA_SIZE;
21691
- if (!this.validateHeader(header, data.length)) {
21692
- return result;
21693
- }
21694
- result.header = header;
21695
- if (header.flags & FLAG_HAS_METADATA) {
21696
- if (data.length < offset + HEADER_METADATA_SIZE) {
21697
- return result;
21698
- }
21699
- const metadataBytes = data.slice(offset, offset + HEADER_METADATA_SIZE);
21700
- const metadataStr = this.fixedBytesToString(metadataBytes);
21701
- result.metadata = { metadata: metadataStr };
21702
- offset += HEADER_METADATA_SIZE;
21703
- }
21704
- if (header.flags & FLAG_HAS_CODEC_DATA) {
21705
- if (data.length < offset + HEADER_CODEC_DATA_SIZE) {
21706
- return result;
21707
- }
21708
- result.codec_data = {
21709
- sample_rate: view.getUint32(offset, true),
21710
- timebase_num: view.getUint32(offset + 4, true),
21711
- timebase_den: view.getUint32(offset + 8, true),
21712
- codec_profile: view.getUint16(offset + 12, true),
21713
- codec_level: view.getUint16(offset + 14, true),
21714
- width: view.getUint16(offset + 16, true),
21715
- height: view.getUint16(offset + 18, true),
21716
- codec_type: view.getUint8(offset + 20),
21717
- channels: view.getUint8(offset + 21),
21718
- bit_depth: view.getUint8(offset + 22),
21719
- reserved: view.getUint8(offset + 23)
21720
- };
21721
- offset += HEADER_CODEC_DATA_SIZE;
22237
+ static parse(data) {
22238
+ const result = { valid: false, header: null, payload: null };
22239
+ if (!data || data.length < PREFIX_SIZE) return result;
22240
+ const view = new DataView(data.buffer, data.byteOffset, data.byteLength);
22241
+ const headerSize = view.getUint32(0, true);
22242
+ if (data.length < PREFIX_SIZE + headerSize) return result;
22243
+ try {
22244
+ const headerBytes = data.subarray(PREFIX_SIZE, PREFIX_SIZE + headerSize);
22245
+ result.header = sesame.v1.wire.FrameHeader.decode(headerBytes);
22246
+ result.payload = data.subarray(PREFIX_SIZE + headerSize);
22247
+ result.valid = true;
22248
+ } catch {
21722
22249
  }
21723
- if (offset < data.length) {
21724
- result.payload = data.slice(offset);
21725
- result.payload_size = result.payload.length;
21726
- } else {
21727
- result.payload = new Uint8Array(0);
21728
- result.payload_size = 0;
21729
- }
21730
- result.valid = true;
21731
22250
  return result;
21732
22251
  }
21733
- /**
21734
- * Helper: Convert string to fixed-size byte array (null-terminated)
21735
- */
21736
- static stringToFixedBytes(str, size) {
21737
- const bytes = new Uint8Array(size);
21738
- let encoded;
21739
- if (typeof TextEncoder !== "undefined") {
21740
- const encoder = new TextEncoder();
21741
- encoded = encoder.encode(str);
21742
- } else {
21743
- encoded = new Uint8Array(Buffer.from(str, "utf8"));
21744
- }
21745
- const copyLen = Math.min(encoded.length, size - 1);
21746
- bytes.set(encoded.slice(0, copyLen));
21747
- bytes[copyLen] = 0;
21748
- return bytes;
21749
- }
21750
- /**
21751
- * Helper: Convert fixed-size byte array to string (null-terminated)
21752
- */
21753
- static fixedBytesToString(bytes) {
21754
- let len = bytes.length;
21755
- for (let i = 0; i < bytes.length; i++) {
21756
- if (bytes[i] === 0) {
21757
- len = i;
21758
- break;
21759
- }
21760
- }
21761
- if (typeof TextDecoder !== "undefined") {
21762
- const decoder = new TextDecoder();
21763
- return decoder.decode(bytes.slice(0, len));
21764
- } else {
21765
- return Buffer.from(bytes.slice(0, len)).toString("utf8");
21766
- }
21767
- }
21768
22252
  };
21769
22253
 
21770
22254
  // src/sesame-connection.ts
22255
+ var ConnectionState = /* @__PURE__ */ ((ConnectionState2) => {
22256
+ ConnectionState2["Disconnected"] = "disconnected";
22257
+ ConnectionState2["Connecting"] = "connecting";
22258
+ ConnectionState2["Connected"] = "connected";
22259
+ ConnectionState2["Reconnecting"] = "reconnecting";
22260
+ return ConnectionState2;
22261
+ })(ConnectionState || {});
21771
22262
  function waitForEvent(emitter, eventName) {
21772
22263
  return new Promise((resolve) => {
21773
22264
  emitter.once(eventName, resolve);
@@ -21780,6 +22271,7 @@ var SesameConnection = class extends EventEmitter2 {
21780
22271
  this.numRetries = 0;
21781
22272
  this.url = "";
21782
22273
  this.autoReconnect = true;
22274
+ this._state = "disconnected" /* Disconnected */;
21783
22275
  /* Bound listeners so we can removeEventListener later */
21784
22276
  this.boundMessageHandler = (event) => this.messageHandler(event);
21785
22277
  this.boundOpenHandler = () => this.openHandler();
@@ -21787,52 +22279,97 @@ var SesameConnection = class extends EventEmitter2 {
21787
22279
  this.boundErrorHandler = (event) => this.errorHandler(event);
21788
22280
  this.openHandler = () => {
21789
22281
  this.numRetries = 0;
22282
+ this.setState("connected" /* Connected */);
21790
22283
  this.emit("open");
21791
22284
  };
21792
22285
  this.messageHandler = (event) => {
21793
22286
  if (event.data instanceof ArrayBuffer) {
21794
- const parsed = SesameBinaryProtocol.parseData(new Uint8Array(event.data));
21795
- if (!parsed.valid) this.emit("error", new Error("Invalid packet received"));
21796
- if (parsed.header?.type == 1 /* VIDEO_FRAME */) {
21797
- this.emit("video-packet", event.data);
21798
- } else if (parsed.header?.type == 2 /* AUDIO_FRAME */) {
21799
- this.emit("audio-packet", event.data);
21800
- } else if (parsed.header?.type == 3 /* RPC */) {
22287
+ const parsed = WireProtocol.parse(new Uint8Array(event.data));
22288
+ if (!parsed.valid) {
22289
+ this.emit("error", new Error("Invalid packet received"));
22290
+ return;
22291
+ }
22292
+ const frameType = parsed.header?.type;
22293
+ if (frameType === FrameType.FRAME_TYPE_RPC) {
21801
22294
  this.emit("rpc", parsed.payload);
22295
+ } else {
22296
+ this.emit("media-packet", parsed);
21802
22297
  }
21803
22298
  }
21804
22299
  };
21805
22300
  this.url = options.url;
21806
22301
  this.autoReconnect = options.autoReconnect;
21807
- if (options.autoConnect) this.connect().catch(() => log.debug("failed connect"));
22302
+ if (options.autoConnect) this.connect().catch(() => {
22303
+ });
22304
+ }
22305
+ get state() {
22306
+ return this._state;
22307
+ }
22308
+ setState(newState) {
22309
+ if (this._state === newState) return;
22310
+ const prev = this._state;
22311
+ this._state = newState;
22312
+ switch (newState) {
22313
+ case "connected" /* Connected */:
22314
+ log.info("Connected to Sesame");
22315
+ break;
22316
+ case "reconnecting" /* Reconnecting */:
22317
+ if (prev === "connected" /* Connected */) {
22318
+ log.warn("Lost connection to Sesame, will try reconnect..");
22319
+ } else {
22320
+ log.warn("Failed to connect to Sesame, will try reconnect..");
22321
+ }
22322
+ break;
22323
+ case "disconnected" /* Disconnected */:
22324
+ log.info("Disconnected from Sesame");
22325
+ break;
22326
+ }
22327
+ this.emit("state", newState, prev);
21808
22328
  }
21809
22329
  isConnected() {
21810
22330
  return this.socket !== void 0 && this.socket.readyState === WebSocket.OPEN;
21811
22331
  }
21812
22332
  async send(data) {
21813
22333
  if (!this.isConnected()) throw new Error("Not connected");
21814
- const header = SesameBinaryProtocol.initHeader(3 /* RPC */, 0, BigInt(0), BigInt(0));
21815
- const data_to_send = SesameBinaryProtocol.serialize(header, null, null, data);
21816
- if (!data_to_send) throw new Error("Failed to serialize data");
21817
- this.socket.send(data_to_send);
22334
+ const header = { type: sesame.v1.wire.FrameType.FRAME_TYPE_RPC };
22335
+ const frame = WireProtocol.serialize(header, data);
22336
+ this.socket.send(frame);
21818
22337
  return Promise.resolve();
21819
22338
  }
21820
22339
  async connect() {
21821
22340
  this.active = true;
22341
+ if (this._state === "disconnected" /* Disconnected */) {
22342
+ this.setState("connecting" /* Connecting */);
22343
+ }
21822
22344
  this.socket = new WebSocket(this.url);
21823
22345
  this.socket.addEventListener("message", this.boundMessageHandler);
21824
22346
  this.socket.addEventListener("open", this.boundOpenHandler);
21825
22347
  this.socket.addEventListener("close", this.boundCloseHandler);
21826
22348
  this.socket.addEventListener("error", this.boundErrorHandler);
21827
22349
  this.socket.binaryType = "arraybuffer";
21828
- await new Promise((resolve) => {
21829
- const done = () => {
21830
- this.removeListener("open", done);
21831
- this.removeListener("close", done);
21832
- resolve(null);
22350
+ await new Promise((resolve, reject) => {
22351
+ const cleanup = () => {
22352
+ this.removeListener("open", onOpen);
22353
+ this.removeListener("close", onClose);
22354
+ this.removeListener("error", onError);
21833
22355
  };
21834
- this.on("open", done);
21835
- this.on("close", done);
22356
+ const onOpen = () => {
22357
+ cleanup();
22358
+ resolve();
22359
+ };
22360
+ const onError = (err) => {
22361
+ cleanup();
22362
+ reject(err instanceof Error ? err : new Error("WebSocket connection error"));
22363
+ };
22364
+ const onClose = () => {
22365
+ if (!this.isConnected()) {
22366
+ cleanup();
22367
+ reject(new Error("WebSocket connection closed before opening"));
22368
+ }
22369
+ };
22370
+ this.on("open", onOpen);
22371
+ this.on("close", onClose);
22372
+ this.on("error", onError);
21836
22373
  });
21837
22374
  }
21838
22375
  /**
@@ -21841,6 +22378,7 @@ var SesameConnection = class extends EventEmitter2 {
21841
22378
  async disconnect() {
21842
22379
  this.active = false;
21843
22380
  if (!this.socket) {
22381
+ this.setState("disconnected" /* Disconnected */);
21844
22382
  return;
21845
22383
  }
21846
22384
  const sock = this.socket;
@@ -21858,7 +22396,8 @@ var SesameConnection = class extends EventEmitter2 {
21858
22396
  }
21859
22397
  retryHandler() {
21860
22398
  if (this.active && this.autoReconnect) {
21861
- this.connect().catch((err) => log.error("Retry failed", err));
22399
+ this.connect().catch(() => {
22400
+ });
21862
22401
  }
21863
22402
  }
21864
22403
  closeHandler() {
@@ -21868,13 +22407,17 @@ var SesameConnection = class extends EventEmitter2 {
21868
22407
  }
21869
22408
  this.socket = void 0;
21870
22409
  if (this.active) {
21871
- try {
22410
+ if (this.autoReconnect) {
22411
+ this.setState("reconnecting" /* Reconnecting */);
21872
22412
  setTimeout(() => {
21873
22413
  this.retryHandler();
21874
22414
  }, defaultBackoff(++this.numRetries));
21875
- } catch (err) {
21876
- log.error("Connection error", err);
22415
+ } else {
22416
+ this.active = false;
22417
+ this.setState("disconnected" /* Disconnected */);
21877
22418
  }
22419
+ } else {
22420
+ this.setState("disconnected" /* Disconnected */);
21878
22421
  }
21879
22422
  }
21880
22423
  errorHandler(error) {
@@ -21900,9 +22443,6 @@ var StatusApi = class {
21900
22443
  async getIODevices() {
21901
22444
  return this.rpc.service.requestIODeviceList(new sesame.v1.common.Empty());
21902
22445
  }
21903
- async requestKeyframe(outputId) {
21904
- await this.rpc.service.requestKeyframe({ id: outputId });
21905
- }
21906
22446
  };
21907
22447
 
21908
22448
  // src/recorder-api.ts
@@ -21959,55 +22499,52 @@ var JobsApi = class {
21959
22499
  this.rpc = rpc;
21960
22500
  }
21961
22501
  async importClip(config) {
21962
- const msg = sesame.v1.jobs.ImportStartRequest.create();
21963
- msg.config = config;
21964
- const res = await this.rpc.service.requestClipImportStart(msg);
22502
+ const importReq = sesame.v1.jobs.ImportStartRequest.create();
22503
+ importReq.config = config;
22504
+ const msg = sesame.v1.jobs.JobStartRequest.create({ importRequest: importReq });
22505
+ const res = await this.rpc.service.startJob(msg);
21965
22506
  if (res.error) {
21966
22507
  throw new Error(res.error);
21967
22508
  }
21968
22509
  return res;
21969
22510
  }
21970
- async getImportStatus() {
21971
- const msg = sesame.v1.jobs.ImportListRequest.create();
21972
- return this.rpc.service.requestClipImportList(msg);
21973
- }
21974
- async abortImport(jobId) {
21975
- const msg = { jobId };
21976
- return this.rpc.service.requestClipImportAbort(msg);
21977
- }
21978
22511
  async exportPlaylist(playlist, config) {
21979
- const msg = sesame.v1.jobs.ExportStartRequest.create();
22512
+ const exportReq = sesame.v1.jobs.ExportStartRequest.create();
21980
22513
  if (!config.filename) throw new Error("Filename is required");
21981
- msg.config = {
22514
+ exportReq.config = {
21982
22515
  ...config,
21983
- filename: config.filename,
21984
- videoCodec: config.videoCodec ?? sesame.v1.common.CodecId.CODEC_ID_H264,
22516
+ videoCodec: config.videoCodec ?? sesame.v1.common.CodecType.CODEC_TYPE_VIDEO_AVC,
21985
22517
  videoBitrateKbps: config.videoBitrateKbps ?? 1024,
21986
- audioCodec: config.audioCodec ?? sesame.v1.jobs.AudioCodecId.AUDIO_CODEC_ID_AAC,
22518
+ audioCodec: config.audioCodec ?? sesame.v1.common.CodecType.CODEC_TYPE_AUDIO_AAC,
21987
22519
  audioBitrateKbps: config.audioBitrateKbps ?? 128,
21988
22520
  audioChannels: config.audioChannels ?? 4,
21989
22521
  audioRouting: config.audioRouting ?? [0, 1, 2, 3]
21990
22522
  };
21991
- msg.items = playlist.clips.map((clip) => ({
21992
- id: clip.id,
21993
- recorderId: clip.recorderId,
22523
+ exportReq.items = playlist.clips.map((clip) => ({
22524
+ ...clip,
21994
22525
  transitionTimeUs: clip.transitionTimeUs ?? 0,
21995
22526
  transitionType: clip.transitionType ?? sesame.v1.recorder.TransitionType.TRANSITION_TYPE_MIX,
21996
22527
  transitionFadeColor: clip.transitionFadeColor ?? { x: 0, y: 0, z: 0, w: 0 },
21997
- speed: clip.speed ?? 1,
21998
- audioRouting: clip.audioRouting,
21999
- startTimeUs: clip.startTimeUs,
22000
- endTimeUs: clip.endTimeUs
22528
+ speed: clip.speed ?? 1
22001
22529
  }));
22002
- await this.rpc.service.requestPlaylistExportStart(msg);
22530
+ const msg = sesame.v1.jobs.JobStartRequest.create({ exportRequest: exportReq });
22531
+ const job = await this.rpc.service.startJob(msg);
22532
+ if (job.error) {
22533
+ throw new Error(job.error);
22534
+ }
22535
+ return job;
22003
22536
  }
22004
- async getExportStatus() {
22005
- const msg = sesame.v1.jobs.ExportListRequest.create();
22006
- return this.rpc.service.requestPlaylistExportList(msg);
22537
+ async abortJob(jobId) {
22538
+ const msg = { jobId };
22539
+ return this.rpc.service.abortJob(msg);
22007
22540
  }
22008
- async abortExport(jobId) {
22541
+ async getJobStatus(jobId) {
22009
22542
  const msg = { jobId };
22010
- return this.rpc.service.requestPlaylistExportAbort(msg);
22543
+ return this.rpc.service.getJobStatus(msg);
22544
+ }
22545
+ async listJobs() {
22546
+ const msg = {};
22547
+ return this.rpc.service.listJobs(msg);
22011
22548
  }
22012
22549
  };
22013
22550
 
@@ -22051,10 +22588,7 @@ var SesameClient = class extends EventEmitter3 {
22051
22588
  constructor(portOrUrl) {
22052
22589
  super();
22053
22590
  this.subscriptions = [];
22054
- this.errorIsLogged = false;
22055
- this.onVideoPacket = () => {
22056
- };
22057
- this.onAudioPacket = () => {
22591
+ this.onMediaPacket = () => {
22058
22592
  };
22059
22593
  this.onCallbackMessage = () => {
22060
22594
  };
@@ -22065,17 +22599,12 @@ var SesameClient = class extends EventEmitter3 {
22065
22599
  autoReconnect: true
22066
22600
  });
22067
22601
  this.conn.on("error", () => {
22068
- if (!this.errorIsLogged) {
22069
- log.warn("Could not connect to Sesame Engine, will keep trying..");
22070
- this.errorIsLogged = true;
22071
- }
22072
22602
  });
22073
22603
  let events = {
22074
22604
  [sesame.v1.common.EventTopic.EVENT_TOPIC_ERROR]: sesame.v1.status.Event,
22075
22605
  [sesame.v1.common.EventTopic.EVENT_TOPIC_TRANSPORT]: sesame.v1.status.Event,
22076
22606
  [sesame.v1.common.EventTopic.EVENT_TOPIC_CALLBACK]: sesame.v1.status.Event,
22077
- [sesame.v1.common.EventTopic.EVENT_TOPIC_PLAYLIST_EXPORT]: sesame.v1.status.Event,
22078
- [sesame.v1.common.EventTopic.EVENT_TOPIC_CLIP_IMPORT]: sesame.v1.status.Event,
22607
+ [sesame.v1.common.EventTopic.EVENT_TOPIC_JOB]: sesame.v1.status.Event,
22079
22608
  [sesame.v1.common.EventTopic.EVENT_TOPIC_RECORDER]: sesame.v1.status.Event
22080
22609
  };
22081
22610
  let options = {
@@ -22093,18 +22622,18 @@ var SesameClient = class extends EventEmitter3 {
22093
22622
  }
22094
22623
  });
22095
22624
  this.rpc.on("error", (err) => {
22096
- log.error(`RPC error: ${err.message}`);
22625
+ if (this.isConnected()) {
22626
+ log.error(`RPC error: ${err.message}`);
22627
+ }
22097
22628
  });
22098
22629
  this.conn.on("open", async () => {
22099
22630
  this.sendSubscriptions();
22100
- this.errorIsLogged = false;
22101
22631
  this.emit("connected");
22102
22632
  });
22103
22633
  this.conn.on("close", () => {
22104
22634
  this.emit("disconnected");
22105
22635
  });
22106
- this.conn.on("video-packet", (data) => this.onVideoPacket(this.videoSubscriptionId, data));
22107
- this.conn.on("audio-packet", (data) => this.onAudioPacket(this.videoSubscriptionId, data));
22636
+ this.conn.on("media-packet", (frame) => this.onMediaPacket(this.mediaSubscriptionId, frame));
22108
22637
  this.subscriptions = [];
22109
22638
  }
22110
22639
  isConnected() {
@@ -22114,14 +22643,14 @@ var SesameClient = class extends EventEmitter3 {
22114
22643
  if (!this.isConnected()) return;
22115
22644
  const eventTopics = this.subscriptions.map((subscription) => subscription.topic);
22116
22645
  const channels = [];
22117
- if (this.videoSubscriptionId) channels.push(`video/${this.videoSubscriptionId}`);
22646
+ if (this.mediaSubscriptionId) channels.push(`media-stream/${this.mediaSubscriptionId}`);
22118
22647
  let subs = { eventTopics, channels };
22119
22648
  this.rpc.service.updateSubscriptions(subs).catch((err) => {
22120
22649
  log.error(`Failed to update subscriptions: ${err.message}`);
22121
22650
  });
22122
22651
  }
22123
- addVideoSubscription(id) {
22124
- this.videoSubscriptionId = id;
22652
+ addMediaSubscription(id) {
22653
+ this.mediaSubscriptionId = id;
22125
22654
  this.sendSubscriptions();
22126
22655
  }
22127
22656
  addSubscription(topic, callback) {
@@ -22140,6 +22669,9 @@ var SesameClient = class extends EventEmitter3 {
22140
22669
  getService() {
22141
22670
  return this.rpc;
22142
22671
  }
22672
+ async requestKeyframe(outputId) {
22673
+ await this.rpc.service.requestKeyframe({ id: outputId });
22674
+ }
22143
22675
  async execute(cl) {
22144
22676
  cl.filterCreatedAndDestroyedSources();
22145
22677
  if (cl.getCommandListMsg().commandList.length > 0) {
@@ -22159,19 +22691,21 @@ var Event = sesame.v1.rpc.Event;
22159
22691
  export {
22160
22692
  CodecType,
22161
22693
  CommandList,
22694
+ ConnectionState,
22162
22695
  EaseKind,
22163
22696
  Event,
22697
+ FrameHeader,
22698
+ FrameType,
22164
22699
  JobsApi,
22165
22700
  Message,
22166
- PacketType,
22167
22701
  RPCClient,
22168
22702
  RecorderApi,
22169
22703
  Request,
22170
22704
  Response,
22171
- SesameBinaryProtocol,
22172
22705
  SesameClient,
22173
22706
  SesameConnection,
22174
22707
  StatusApi,
22708
+ WireProtocol,
22175
22709
  getLogger,
22176
22710
  log,
22177
22711
  sesame,