@norskvideo/norsk-sdk 1.0.337 → 1.0.338
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/lib/src/media_nodes/input.d.ts +12 -0
- package/lib/src/media_nodes/input.js +1 -1
- package/lib/src/media_nodes/output.d.ts +2 -0
- package/lib/src/media_nodes/output.js +1 -1
- package/lib/src/media_nodes/processor.d.ts +15 -4
- package/lib/src/media_nodes/processor.js +64 -36
- package/lib/src/media_nodes/types.d.ts +43 -0
- package/lib/src/media_nodes/types.js +79 -8
- package/lib/src/sdk.js +1 -0
- package/lib/src/types.d.ts +9 -0
- package/lib/src/types.js +29 -1
- package/package.json +2 -2
- package/src/sdk.ts +3 -1
- package/src/types.ts +65 -16
- package/dist/norsk-sdk.d.ts +0 -3979
- package/lib/src/tsdoc-metadata.json +0 -11
|
@@ -273,8 +273,20 @@ export declare class DeckLinkInputNode extends SourceMediaNode {
|
|
|
273
273
|
}
|
|
274
274
|
/** @public */
|
|
275
275
|
export interface WhipInputSettings extends InputSettings<WhipInputNode>, StreamStatisticsMixin {
|
|
276
|
+
/** List of ice servers to use as part of session negotiation */
|
|
276
277
|
iceServers?: IceServerSettings[];
|
|
278
|
+
/** Internal addresses for the ice servers (defaults to iceServers) */
|
|
277
279
|
reportedIceServers?: IceServerSettings[];
|
|
280
|
+
/**
|
|
281
|
+
* List of IPs to advertise as your host address - useful e.g. when on a cloud server
|
|
282
|
+
* so that the public rather than private IP is used.
|
|
283
|
+
*/
|
|
284
|
+
hostIps?: string[];
|
|
285
|
+
/**
|
|
286
|
+
* Similar to hostIps, but a list of server reflexive candidates so that ICE negotiations can be
|
|
287
|
+
* sped up
|
|
288
|
+
*/
|
|
289
|
+
serverReflexiveIps?: string[];
|
|
278
290
|
}
|
|
279
291
|
/**
|
|
280
292
|
* @public
|
|
@@ -534,7 +534,7 @@ class WhipInputNode extends common_1.SourceMediaNode {
|
|
|
534
534
|
statsSampling: settings.statsSampling
|
|
535
535
|
? (0, utils_1.provideFull)(media_pb_1.StreamStatisticsSampling, settings.statsSampling)
|
|
536
536
|
: undefined,
|
|
537
|
-
|
|
537
|
+
serverConfiguration: (0, types_1.mkWebrtcServerSettings)(settings),
|
|
538
538
|
});
|
|
539
539
|
this.grpcStream = client.createInputWhip();
|
|
540
540
|
this.grpcStream.write(new media_pb_1.WhipInputMessage((0, utils_1.mkMessageCase)({ initialConfig: config })));
|
|
@@ -589,6 +589,8 @@ export declare class WhipOutputNode extends AutoSinkMediaNode<"audio" | "video">
|
|
|
589
589
|
export interface WhepOutputSettings extends SinkNodeSettings<WhepOutputNode>, StreamStatisticsMixin {
|
|
590
590
|
iceServers?: IceServerSettings[];
|
|
591
591
|
reportedIceServers?: IceServerSettings[];
|
|
592
|
+
hostIps?: string[];
|
|
593
|
+
serverReflexiveIps?: string[];
|
|
592
594
|
/** Jitter buffer delay in milliseconds */
|
|
593
595
|
bufferDelayMs?: number;
|
|
594
596
|
}
|
|
@@ -569,7 +569,7 @@ class WhepOutputNode extends common_1.AutoSinkMediaNode {
|
|
|
569
569
|
? (0, utils_1.provideFull)(media_pb_1.MediaNodeId, { id: settings.id })
|
|
570
570
|
: undefined, statsSampling: settings.statsSampling
|
|
571
571
|
? (0, utils_1.provideFull)(media_pb_1.StreamStatisticsSampling, settings.statsSampling)
|
|
572
|
-
: undefined,
|
|
572
|
+
: undefined, serverConfiguration: (0, types_1.mkWebrtcServerSettings)(settings), bufferDelayMs: Math.round(settings.bufferDelayMs || 0) }));
|
|
573
573
|
this.grpcStream = this.client.createOutputWhep();
|
|
574
574
|
this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.WhepOutputMessage, (0, utils_1.mkMessageCase)({ configuration: webrtcOutputConfig })));
|
|
575
575
|
this.initialised = new Promise((resolve, reject) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PlainMessage } from "@bufbuild/protobuf";
|
|
2
2
|
import { MediaClient } from "@norskvideo/norsk-api/lib/media_grpc_pb";
|
|
3
3
|
import { Scte35SpliceInfoSection, StreamStatisticsSampling, Subscription } from "@norskvideo/norsk-api/lib/media_pb";
|
|
4
|
-
import { FrameRate } from "../types";
|
|
4
|
+
import { FrameRate, VancPayloadFormat, VancType2AncillaryId } from "../types";
|
|
5
5
|
import { AutoSinkMediaNode, MediaNodeState, SourceMediaNode, SourceNodeSettings, StreamStatisticsMixin } from "./common";
|
|
6
|
-
import { AacProfile, AudioMeasureLevels, AwsCredentials, ChannelLayout, ComposeMissingStreamBehaviour, Db, IceServerSettings, LoganH264, LoganHevc, MultiStreamStatistics, NvidiaH264, NvidiaHevc, PixelFormat, QuadraH264, QuadraHevc, Resolution, SampleAspectRatio, SampleRate, SentenceBuildMode, SimpleEasing, StabilizationMode, StreamKey, StreamMetadata, X264Codec, X265Codec } from "./types";
|
|
6
|
+
import { AacProfile, AudioMeasureLevels, AwsCredentials, ChannelLayout, ComposeMissingStreamBehaviour, Db, IceServerSettings, LoganH264, LoganHevc, MultiStreamStatistics, NvidiaH264, NvidiaHevc, PixelFormat, QuadraH264, QuadraHevc, XilinxH264, XilinxHevc, Resolution, SampleAspectRatio, SampleRate, SentenceBuildMode, SimpleEasing, StabilizationMode, StreamKey, StreamMetadata, X264Codec, X265Codec } from "./types";
|
|
7
7
|
interface ProcessorMediaNode<Pins extends string> extends SourceMediaNode, AutoSinkMediaNode<Pins> {
|
|
8
8
|
}
|
|
9
9
|
declare class ProcessorMediaNode<Pins extends string> {
|
|
@@ -216,8 +216,17 @@ export interface StreamSyncSettings extends ProcessorNodeSettings<StreamSyncNode
|
|
|
216
216
|
export declare class StreamSyncNode extends AutoProcessorMediaNode<"audio" | "video"> {
|
|
217
217
|
close(): void;
|
|
218
218
|
}
|
|
219
|
+
export interface Smpte2038Message {
|
|
220
|
+
cNotYChannelFlag: boolean;
|
|
221
|
+
lineNumber: number;
|
|
222
|
+
horizontalOffset: number;
|
|
223
|
+
payloadFormat: VancPayloadFormat;
|
|
224
|
+
ancillaryId: VancType2AncillaryId;
|
|
225
|
+
userData: Uint8Array;
|
|
226
|
+
}
|
|
219
227
|
export interface AncillarySettings extends ProcessorNodeSettings<AncillaryNode> {
|
|
220
228
|
onScte35?: (stream: StreamKey, message: Scte35SpliceInfoSection) => void;
|
|
229
|
+
onSmpte2038?: (stream: StreamKey, message: Smpte2038Message) => void;
|
|
221
230
|
}
|
|
222
231
|
export declare class AncillaryNode extends AutoProcessorMediaNode<"ancillary"> {
|
|
223
232
|
close(): void;
|
|
@@ -660,13 +669,13 @@ export interface VideoEncodeRung {
|
|
|
660
669
|
/**
|
|
661
670
|
* The codec (and detailed configuration) to use for the encoding operation.
|
|
662
671
|
*
|
|
663
|
-
* Note: Nvidia
|
|
672
|
+
* Note: Nvidia, Logan/Quadra, and Xilinx require Nvidia, Logan/Quadra and Xilinx hardware to be set up and
|
|
664
673
|
* made available to Norsk
|
|
665
674
|
*
|
|
666
675
|
* A ladder can use several different codecs across its various rungs and the
|
|
667
676
|
* VideoEncode node will attempt to build a pipeline that uses the hardware efficently
|
|
668
677
|
*/
|
|
669
|
-
codec: X264Codec | X265Codec | NvidiaH264 | NvidiaHevc | LoganH264 | LoganHevc | QuadraH264 | QuadraHevc;
|
|
678
|
+
codec: X264Codec | X265Codec | NvidiaH264 | NvidiaHevc | LoganH264 | LoganHevc | QuadraH264 | QuadraHevc | XilinxH264 | XilinxHevc;
|
|
670
679
|
}
|
|
671
680
|
/**
|
|
672
681
|
* @public
|
|
@@ -754,6 +763,8 @@ export declare class StreamChaosMonkeyNode extends AutoProcessorMediaNode<"audio
|
|
|
754
763
|
export interface WebRTCBrowserSettings extends ProcessorNodeSettings<WebRTCBrowserNode>, StreamStatisticsMixin {
|
|
755
764
|
iceServers?: IceServerSettings[];
|
|
756
765
|
reportedIceServers?: IceServerSettings[];
|
|
766
|
+
hostIps?: string[];
|
|
767
|
+
serverReflexiveIps?: string[];
|
|
757
768
|
/** Jitter buffer delay in milliseconds */
|
|
758
769
|
bufferDelayMs?: number;
|
|
759
770
|
}
|
|
@@ -36,8 +36,9 @@ exports.NorskProcessor = exports.WebRTCBrowserNode = exports.StreamChaosMonkeyNo
|
|
|
36
36
|
const media_pb_1 = require("@norskvideo/norsk-api/lib/media_pb");
|
|
37
37
|
const util = __importStar(require("util"));
|
|
38
38
|
const utils_1 = require("../shared/utils");
|
|
39
|
+
const types_1 = require("../types");
|
|
39
40
|
const common_1 = require("./common");
|
|
40
|
-
const
|
|
41
|
+
const types_2 = require("./types");
|
|
41
42
|
class ProcessorMediaNode {
|
|
42
43
|
constructor(client, subscribeFn) {
|
|
43
44
|
this.client = client;
|
|
@@ -142,7 +143,7 @@ class StreamSwitchSmoothNode extends ProcessorMediaNode {
|
|
|
142
143
|
: undefined,
|
|
143
144
|
transitionDurationMs: settings.transitionDurationMs !== undefined ? settings.transitionDurationMs : 300.0,
|
|
144
145
|
outputResolution: (0, utils_1.provideFull)(media_pb_1.Resolution, settings.outputResolution),
|
|
145
|
-
sampleRate: (0,
|
|
146
|
+
sampleRate: (0, types_2.toSampleRate)(settings.sampleRate)
|
|
146
147
|
});
|
|
147
148
|
this.grpcStream = this.client.createControlStreamSwitchSmooth();
|
|
148
149
|
this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.StreamSwitchSmoothMessage, (0, utils_1.mkMessageCase)({ initialConfig: streamSwitchSmoothConfig })));
|
|
@@ -172,14 +173,14 @@ class StreamSwitchSmoothNode extends ProcessorMediaNode {
|
|
|
172
173
|
let ctxMap = new Map();
|
|
173
174
|
for (let ctx of context.contexts) {
|
|
174
175
|
if (ctx.pin) {
|
|
175
|
-
ctxMap.set(ctx.pin.inputPin, ctx.streams.map(
|
|
176
|
+
ctxMap.set(ctx.pin.inputPin, ctx.streams.map(types_2.fromStreamMetadata));
|
|
176
177
|
}
|
|
177
178
|
}
|
|
178
179
|
let onChange = settings.onInboundContextChange ? settings.onInboundContextChange(ctxMap) : Promise.resolve();
|
|
179
180
|
let unblock = util.promisify(client.unblockCall).bind(client);
|
|
180
181
|
onChange.then(() => {
|
|
181
182
|
unblock((0, utils_1.provideFull)(media_pb_1.BlockingCallRef, {
|
|
182
|
-
mediaNodeId: (0,
|
|
183
|
+
mediaNodeId: (0, types_2.toMediaNodeId)(this.id),
|
|
183
184
|
blockingCallRef: context.blockingCallRef,
|
|
184
185
|
}));
|
|
185
186
|
});
|
|
@@ -260,7 +261,7 @@ class StreamStatisticsNode extends AutoProcessorMediaNode {
|
|
|
260
261
|
}
|
|
261
262
|
case "streamStatistics": {
|
|
262
263
|
const stats = data.message.value;
|
|
263
|
-
settings.onStreamStatistics((0,
|
|
264
|
+
settings.onStreamStatistics((0, types_2.fromStreamStatistics)(stats, this.subscribedStreams));
|
|
264
265
|
break;
|
|
265
266
|
}
|
|
266
267
|
default:
|
|
@@ -321,7 +322,7 @@ class AudioMeasureLevelsNode extends AutoProcessorMediaNode {
|
|
|
321
322
|
}
|
|
322
323
|
case "levels": {
|
|
323
324
|
const levels = data.message.value;
|
|
324
|
-
settings.onData((0,
|
|
325
|
+
settings.onData((0, types_2.fromAudioMeasureLevels)(levels));
|
|
325
326
|
break;
|
|
326
327
|
}
|
|
327
328
|
default:
|
|
@@ -421,7 +422,7 @@ class StreamKeyOverrideNode extends AutoProcessorMediaNode {
|
|
|
421
422
|
id: settings.id
|
|
422
423
|
? (0, utils_1.provideFull)(media_pb_1.MediaNodeId, { id: settings.id })
|
|
423
424
|
: undefined,
|
|
424
|
-
streamKey: (0,
|
|
425
|
+
streamKey: (0, types_2.mkStreamKey)(settings.streamKey),
|
|
425
426
|
});
|
|
426
427
|
this.grpcStream = this.client.createTransformStreamKeyOverride();
|
|
427
428
|
this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.StreamKeyOverrideMessage, (0, utils_1.mkMessageCase)({ initialConfig: config })));
|
|
@@ -700,7 +701,23 @@ class AncillaryNode extends AutoProcessorMediaNode {
|
|
|
700
701
|
}
|
|
701
702
|
case "scte35Event": {
|
|
702
703
|
if (settings.onScte35 && data.message.value.stream && data.message.value.info) {
|
|
703
|
-
settings.onScte35((0,
|
|
704
|
+
settings.onScte35((0, types_2.fromStreamKey)(data.message.value.stream), data.message.value.info);
|
|
705
|
+
}
|
|
706
|
+
break;
|
|
707
|
+
}
|
|
708
|
+
case "smpte2038Message": {
|
|
709
|
+
if (settings.onSmpte2038 && data.message.value.stream && data.message.value.ancillaryId) {
|
|
710
|
+
let m = data.message.value;
|
|
711
|
+
let ancillaryId = data.message.value.ancillaryId;
|
|
712
|
+
let converted = {
|
|
713
|
+
cNotYChannelFlag: m.cNotYChannelFlag,
|
|
714
|
+
lineNumber: m.lineNumber,
|
|
715
|
+
horizontalOffset: m.horizontalOffset,
|
|
716
|
+
payloadFormat: (0, types_1.fromVancPayloadFormat)(m.payloadFormat),
|
|
717
|
+
ancillaryId: { did: ancillaryId.did, sdid: ancillaryId.sdid },
|
|
718
|
+
userData: m.userData
|
|
719
|
+
};
|
|
720
|
+
settings.onSmpte2038((0, types_2.fromStreamKey)(data.message.value.stream), converted);
|
|
704
721
|
}
|
|
705
722
|
break;
|
|
706
723
|
}
|
|
@@ -723,7 +740,7 @@ class AncillaryNode extends AutoProcessorMediaNode {
|
|
|
723
740
|
this.grpcStream.cancel();
|
|
724
741
|
}
|
|
725
742
|
sendScte35(key, info) {
|
|
726
|
-
this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.AncillaryMessage, (0, utils_1.mkMessageCase)({ scte35Event: (0, utils_1.provideFull)(media_pb_1.Scte35Event, { info, stream: (0,
|
|
743
|
+
this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.AncillaryMessage, (0, utils_1.mkMessageCase)({ scte35Event: (0, utils_1.provideFull)(media_pb_1.Scte35Event, { info, stream: (0, types_2.mkStreamKey)(key) }) })));
|
|
727
744
|
}
|
|
728
745
|
}
|
|
729
746
|
exports.AncillaryNode = AncillaryNode;
|
|
@@ -747,8 +764,8 @@ class AudioEncodeNode extends AutoProcessorMediaNode {
|
|
|
747
764
|
encoder = {
|
|
748
765
|
case: "aac",
|
|
749
766
|
value: (0, utils_1.provideFull)(media_pb_1.AacEncodeConfiguration, {
|
|
750
|
-
sampleRate: (0,
|
|
751
|
-
profile: (0,
|
|
767
|
+
sampleRate: (0, types_2.toSampleRate)(settings.codec.sampleRate),
|
|
768
|
+
profile: (0, types_2.toAacProfile)(settings.codec.profile),
|
|
752
769
|
// TODO: expose encapsulation?
|
|
753
770
|
encapsulation: media_pb_1.AacEncodeConfiguration_AacEncapsulation.AAC_ADTS_ENCAPSULATION,
|
|
754
771
|
}),
|
|
@@ -765,7 +782,7 @@ class AudioEncodeNode extends AutoProcessorMediaNode {
|
|
|
765
782
|
renditionName: settings.outputRenditionName,
|
|
766
783
|
}),
|
|
767
784
|
bitrate: settings.bitrate,
|
|
768
|
-
channelLayout: (0,
|
|
785
|
+
channelLayout: (0, types_2.toChannelLayout)(settings.channelLayout),
|
|
769
786
|
encoder,
|
|
770
787
|
});
|
|
771
788
|
this.grpcStream = this.client.createTransformAudioEncode();
|
|
@@ -816,7 +833,7 @@ const convertTransition = (transition) => {
|
|
|
816
833
|
}
|
|
817
834
|
let res = (0, utils_1.provideFull)(media_pb_1.Transition, { durationMs: transition.durationMs });
|
|
818
835
|
if (transition.easing) {
|
|
819
|
-
res.easing = (0, utils_1.provideFull)(media_pb_1.Easing, (0, utils_1.mkMessageCase)({ simple: (0,
|
|
836
|
+
res.easing = (0, utils_1.provideFull)(media_pb_1.Easing, (0, utils_1.mkMessageCase)({ simple: (0, types_2.toSimpleEasing)(transition.easing) }));
|
|
820
837
|
}
|
|
821
838
|
return res;
|
|
822
839
|
};
|
|
@@ -859,10 +876,10 @@ class VideoComposeNode extends ProcessorMediaNode {
|
|
|
859
876
|
? (0, utils_1.provideFull)(media_pb_1.Resolution, settings.referenceResolution)
|
|
860
877
|
: undefined,
|
|
861
878
|
outputPixelFormat: settings.outputPixelFormat !== undefined
|
|
862
|
-
? (0,
|
|
879
|
+
? (0, types_2.toPixelFormat)(settings.outputPixelFormat)
|
|
863
880
|
: media_pb_1.VideoComposeConfiguration_PixelFormat.UNSPECIFIED,
|
|
864
881
|
missingStreamBehaviour: settings.missingStreamBehaviour !== undefined
|
|
865
|
-
? (0,
|
|
882
|
+
? (0, types_2.toComposeMissingStreamBehaviour)(settings.missingStreamBehaviour)
|
|
866
883
|
: media_pb_1.VideoComposeConfiguration_MissingStreamBehaviour.UNSPECIFIED_BEHAVIOUR,
|
|
867
884
|
});
|
|
868
885
|
this.grpcStream = this.client.createTransformVideoCompose();
|
|
@@ -929,7 +946,7 @@ exports.VideoComposeNode = VideoComposeNode;
|
|
|
929
946
|
const audioMixSource = (source) => new media_pb_1.AudioMixSource({
|
|
930
947
|
pin: (0, utils_1.provideFull)(media_pb_1.InputPin, { inputPin: source.pin }),
|
|
931
948
|
channelGains: source.channelGains
|
|
932
|
-
? source.channelGains.map(
|
|
949
|
+
? source.channelGains.map(types_2.mkDb)
|
|
933
950
|
: undefined,
|
|
934
951
|
});
|
|
935
952
|
/**
|
|
@@ -945,7 +962,7 @@ class AudioMixNode extends ProcessorMediaNode {
|
|
|
945
962
|
? (0, utils_1.provideFull)(media_pb_1.MediaNodeId, { id: settings.id })
|
|
946
963
|
: undefined,
|
|
947
964
|
outputSourceName: settings.outputSource,
|
|
948
|
-
sampleRate: (0,
|
|
965
|
+
sampleRate: (0, types_2.toSampleRate)(settings.sampleRate !== undefined ? settings.sampleRate : 48000),
|
|
949
966
|
sources: settings.sources.map(audioMixSource),
|
|
950
967
|
});
|
|
951
968
|
this.grpcStream = this.client.createTransformAudioMix();
|
|
@@ -1012,7 +1029,7 @@ class AudioMixMatrixNode extends AutoProcessorMediaNode {
|
|
|
1012
1029
|
constructor(settings, client) {
|
|
1013
1030
|
super(client, (subscription) => this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.AudioMixMatrixMessage, (0, utils_1.mkMessageCase)({ subscription }))));
|
|
1014
1031
|
// Check if we have a row of gains for each output channel
|
|
1015
|
-
let outputChannels = (0,
|
|
1032
|
+
let outputChannels = (0, types_2.getAmountOfChannels)(settings.outputChannelLayout);
|
|
1016
1033
|
if (outputChannels !== settings.channelGains.length) {
|
|
1017
1034
|
throw new Error(`The number of channels in the output channel layout (${outputChannels}) should match the number of rows in the matrix (${settings.channelGains.length})`);
|
|
1018
1035
|
}
|
|
@@ -1020,9 +1037,9 @@ class AudioMixMatrixNode extends AutoProcessorMediaNode {
|
|
|
1020
1037
|
id: settings.id
|
|
1021
1038
|
? (0, utils_1.provideFull)(media_pb_1.MediaNodeId, { id: settings.id })
|
|
1022
1039
|
: undefined,
|
|
1023
|
-
outputChannelLayout: (0,
|
|
1040
|
+
outputChannelLayout: (0, types_2.toChannelLayout)(settings.outputChannelLayout),
|
|
1024
1041
|
channelGainMappings: settings.channelGains.map((outputChannelGains) => (0, utils_1.provideFull)(media_pb_1.ChannelGainMapping, {
|
|
1025
|
-
channelGains: outputChannelGains.map(
|
|
1042
|
+
channelGains: outputChannelGains.map(types_2.mkDb),
|
|
1026
1043
|
})),
|
|
1027
1044
|
});
|
|
1028
1045
|
this.grpcStream = this.client.createTransformAudioMixMatrix();
|
|
@@ -1072,7 +1089,7 @@ class AudioMixMatrixNode extends AutoProcessorMediaNode {
|
|
|
1072
1089
|
updateConfig(settings) {
|
|
1073
1090
|
let configUpdate = (0, utils_1.provideFull)(media_pb_1.AudioMixMatrixUpdateConfiguration, {
|
|
1074
1091
|
channelGainMappings: settings.channelGains.map((outputChannelGains) => (0, utils_1.provideFull)(media_pb_1.ChannelGainMapping, {
|
|
1075
|
-
channelGains: outputChannelGains.map(
|
|
1092
|
+
channelGains: outputChannelGains.map(types_2.mkDb),
|
|
1076
1093
|
})),
|
|
1077
1094
|
});
|
|
1078
1095
|
this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.AudioMixMatrixMessage, (0, utils_1.mkMessageCase)({ updateConfig: configUpdate })));
|
|
@@ -1095,7 +1112,7 @@ class AudioGainNode extends AutoProcessorMediaNode {
|
|
|
1095
1112
|
? (0, utils_1.provideFull)(media_pb_1.MediaNodeId, { id: settings.id })
|
|
1096
1113
|
: undefined,
|
|
1097
1114
|
channelGains: settings.channelGains
|
|
1098
|
-
? settings.channelGains.map(
|
|
1115
|
+
? settings.channelGains.map(types_2.mkDb)
|
|
1099
1116
|
: undefined,
|
|
1100
1117
|
});
|
|
1101
1118
|
this.grpcStream = this.client.createTransformAudioGain();
|
|
@@ -1145,7 +1162,7 @@ class AudioGainNode extends AutoProcessorMediaNode {
|
|
|
1145
1162
|
updateConfig(settings) {
|
|
1146
1163
|
let configUpdate = new media_pb_1.AudioGainUpdateConfiguration({
|
|
1147
1164
|
channelGains: settings.channelGains
|
|
1148
|
-
? settings.channelGains.map(
|
|
1165
|
+
? settings.channelGains.map(types_2.mkDb)
|
|
1149
1166
|
: undefined,
|
|
1150
1167
|
});
|
|
1151
1168
|
this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.AudioGainMessage, (0, utils_1.mkMessageCase)({ updateConfig: configUpdate })));
|
|
@@ -1246,8 +1263,8 @@ class AudioBuildMultichannelNode extends AutoProcessorMediaNode {
|
|
|
1246
1263
|
outputRenditionName: (0, utils_1.provideFull)(media_pb_1.RenditionName, {
|
|
1247
1264
|
renditionName: settings.outputStreamKey.renditionName,
|
|
1248
1265
|
}),
|
|
1249
|
-
channelLayout: (0,
|
|
1250
|
-
channelList: settings.channelList.map(
|
|
1266
|
+
channelLayout: (0, types_2.toChannelLayout)(settings.channelLayout),
|
|
1267
|
+
channelList: settings.channelList.map(types_2.mkStreamKey),
|
|
1251
1268
|
});
|
|
1252
1269
|
this.grpcStream = this.client.createTransformAudioBuildMultichannel();
|
|
1253
1270
|
this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.AudioBuildMultichannelMessage, (0, utils_1.mkMessageCase)({ initialConfig: config })));
|
|
@@ -1301,7 +1318,7 @@ class AudioTranscribeAwsNode extends AutoProcessorMediaNode {
|
|
|
1301
1318
|
super(client, (subscription) => this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.AudioTranscribeAwsMessage, (0, utils_1.mkMessageCase)({ subscription }))));
|
|
1302
1319
|
let config = (0, utils_1.provideFull)(media_pb_1.AudioTranscribeAwsConfiguration, Object.assign(Object.assign({}, settings), { id: settings.id
|
|
1303
1320
|
? (0, utils_1.provideFull)(media_pb_1.MediaNodeId, { id: settings.id })
|
|
1304
|
-
: undefined, awsRegion: settings.awsRegion, sentenceBuildMode: (0,
|
|
1321
|
+
: undefined, awsRegion: settings.awsRegion, sentenceBuildMode: (0, types_2.toSentenceBuildMode)(settings.sentenceBuildMode), sentenceStabilizationMode: (0, types_2.toStabilizationMode)(settings.sentenceStabilizationMode), awsCredentials: settings.awsCredentials
|
|
1305
1322
|
? (0, utils_1.provideFull)(media_pb_1.AwsCredentials, settings.awsCredentials)
|
|
1306
1323
|
: undefined }));
|
|
1307
1324
|
this.grpcStream = this.client.createTransformAudioTranscribeAws();
|
|
@@ -1361,48 +1378,59 @@ class VideoEncodeNode extends AutoProcessorMediaNode {
|
|
|
1361
1378
|
case "x264":
|
|
1362
1379
|
codec = {
|
|
1363
1380
|
case: codecType,
|
|
1364
|
-
value: (0,
|
|
1381
|
+
value: (0, types_2.toX264Codec)(stream.codec),
|
|
1365
1382
|
};
|
|
1366
1383
|
break;
|
|
1367
1384
|
case "x265":
|
|
1368
1385
|
codec = {
|
|
1369
1386
|
case: codecType,
|
|
1370
|
-
value: (0,
|
|
1387
|
+
value: (0, types_2.toX265Codec)(stream.codec),
|
|
1371
1388
|
};
|
|
1372
1389
|
break;
|
|
1373
1390
|
case "nv-h264":
|
|
1374
1391
|
codec = {
|
|
1375
1392
|
case: "nvidiaH264",
|
|
1376
|
-
value: (0,
|
|
1393
|
+
value: (0, types_2.toNvidiaH264)(stream.codec),
|
|
1377
1394
|
};
|
|
1378
1395
|
break;
|
|
1379
1396
|
case "nv-hevc":
|
|
1380
1397
|
codec = {
|
|
1381
1398
|
case: "nvidiaHevc",
|
|
1382
|
-
value: (0,
|
|
1399
|
+
value: (0, types_2.toNvidiaHevc)(stream.codec),
|
|
1383
1400
|
};
|
|
1384
1401
|
break;
|
|
1385
1402
|
case "logan-h264":
|
|
1386
1403
|
codec = {
|
|
1387
1404
|
case: "loganH264",
|
|
1388
|
-
value: (0,
|
|
1405
|
+
value: (0, types_2.toLoganH264)(stream.codec),
|
|
1389
1406
|
};
|
|
1390
1407
|
break;
|
|
1391
1408
|
case "logan-hevc":
|
|
1392
1409
|
codec = {
|
|
1393
1410
|
case: "loganHevc",
|
|
1394
|
-
value: (0,
|
|
1411
|
+
value: (0, types_2.toLoganHevc)(stream.codec),
|
|
1395
1412
|
};
|
|
1396
1413
|
case "quadra-h264":
|
|
1397
1414
|
codec = {
|
|
1398
1415
|
case: "quadraH264",
|
|
1399
|
-
value: (0,
|
|
1416
|
+
value: (0, types_2.toQuadraH264)(stream.codec),
|
|
1400
1417
|
};
|
|
1401
1418
|
break;
|
|
1402
1419
|
case "quadra-hevc":
|
|
1403
1420
|
codec = {
|
|
1404
1421
|
case: "quadraHevc",
|
|
1405
|
-
value: (0,
|
|
1422
|
+
value: (0, types_2.toQuadraHevc)(stream.codec),
|
|
1423
|
+
};
|
|
1424
|
+
case "xilinx-h264":
|
|
1425
|
+
codec = {
|
|
1426
|
+
case: "xilinxH264",
|
|
1427
|
+
value: (0, types_2.toXilinxH264)(stream.codec),
|
|
1428
|
+
};
|
|
1429
|
+
break;
|
|
1430
|
+
case "xilinx-hevc":
|
|
1431
|
+
codec = {
|
|
1432
|
+
case: "xilinxHevc",
|
|
1433
|
+
value: (0, types_2.toXilinxHevc)(stream.codec),
|
|
1406
1434
|
};
|
|
1407
1435
|
break;
|
|
1408
1436
|
default:
|
|
@@ -1615,7 +1643,7 @@ class WebRTCBrowserNode extends AutoProcessorMediaNode {
|
|
|
1615
1643
|
? (0, utils_1.provideFull)(media_pb_1.MediaNodeId, { id: settings.id })
|
|
1616
1644
|
: undefined, statsSampling: settings.statsSampling
|
|
1617
1645
|
? (0, utils_1.provideFull)(media_pb_1.StreamStatisticsSampling, settings.statsSampling)
|
|
1618
|
-
: undefined,
|
|
1646
|
+
: undefined, serverConfiguration: (0, types_2.mkWebrtcServerSettings)(settings), bufferDelayMs: Math.round(settings.bufferDelayMs || 0) }));
|
|
1619
1647
|
this.grpcStream = this.client.createDuplexWebRTCBrowser();
|
|
1620
1648
|
this.grpcStream.write((0, utils_1.provideFull)(media_pb_1.WebRTCBrowserDuplexMessage, (0, utils_1.mkMessageCase)({ configuration: webrtcOutputConfig })));
|
|
1621
1649
|
this.initialised = new Promise((resolve, reject) => {
|
|
@@ -1645,7 +1673,7 @@ class WebRTCBrowserNode extends AutoProcessorMediaNode {
|
|
|
1645
1673
|
break;
|
|
1646
1674
|
}
|
|
1647
1675
|
case "streamStatistics":
|
|
1648
|
-
(_a = settings.onStreamStatistics) === null || _a === void 0 ? void 0 : _a.call(settings, (0,
|
|
1676
|
+
(_a = settings.onStreamStatistics) === null || _a === void 0 ? void 0 : _a.call(settings, (0, types_2.fromStreamStatistics)(data.message.value, this.subscribedStreams));
|
|
1649
1677
|
break;
|
|
1650
1678
|
default:
|
|
1651
1679
|
const exhaustiveCheck = messageCase;
|
|
@@ -592,6 +592,49 @@ export interface QuadraHevc {
|
|
|
592
592
|
dolbyVisionProfile?: number;
|
|
593
593
|
}
|
|
594
594
|
/** @public */
|
|
595
|
+
export declare type XilinxH264Profile = "baseline" | "main" | "extended" | "high" | "high10";
|
|
596
|
+
/** @public */
|
|
597
|
+
export declare type XilinxHevcProfile = "main" | "main10";
|
|
598
|
+
/** @public */
|
|
599
|
+
export declare type XilinxHevcTier = "main" | "high";
|
|
600
|
+
/** @public */
|
|
601
|
+
export declare type XilinxH264Level = 1 | 2 | 2.1 | 3 | 3.1 | 4 | 4.1 | 5 | 5.1 | 5.2 | 6 | 6.1 | 6.2;
|
|
602
|
+
/** @public */
|
|
603
|
+
export declare type XilinxHevcLevel = 1 | 2 | 2.1 | 3 | 3.1 | 4 | 4.1 | 5 | 5.1 | 5.2 | 6 | 6.1 | 6.2;
|
|
604
|
+
/**
|
|
605
|
+
* @public
|
|
606
|
+
* Settings for a H264 Encode using Netint Xilinx hardware
|
|
607
|
+
* A detailed description of these params can be found
|
|
608
|
+
* on the Netint Xilinx Encoder Documentation
|
|
609
|
+
*
|
|
610
|
+
* These fields have deliberately been written to maintain the same semantics as the
|
|
611
|
+
* Xilinx documentation where possible.
|
|
612
|
+
*
|
|
613
|
+
* If left undefined, all will default to Xilinx's own defaults
|
|
614
|
+
* */
|
|
615
|
+
export interface XilinxH264 {
|
|
616
|
+
type: "xilinx-h264";
|
|
617
|
+
profile?: XilinxH264Profile;
|
|
618
|
+
level?: XilinxH264Level;
|
|
619
|
+
}
|
|
620
|
+
/**
|
|
621
|
+
* @public
|
|
622
|
+
* Settings for a HEVC Encode using Netint Xilinx hardware
|
|
623
|
+
* A detailed description of these params can be found
|
|
624
|
+
* on the Netint Xilinx Encoder Documentation
|
|
625
|
+
*
|
|
626
|
+
* These fields have deliberately been written to maintain the same semantics as the
|
|
627
|
+
* Xilinx documentation where possible.
|
|
628
|
+
*
|
|
629
|
+
* If left undefined, all will default to Xilinx's own defaults
|
|
630
|
+
* */
|
|
631
|
+
export interface XilinxHevc {
|
|
632
|
+
type: "xilinx-hevc";
|
|
633
|
+
profile?: XilinxHevcProfile;
|
|
634
|
+
level?: XilinxHevcLevel;
|
|
635
|
+
tier?: XilinxHevcTier;
|
|
636
|
+
}
|
|
637
|
+
/** @public */
|
|
595
638
|
export declare type RtpLinearPcmBitDepth = 16 | 24;
|
|
596
639
|
/** @public */
|
|
597
640
|
export declare type RtmpServerInputStatus = "disconnected";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
3
|
+
exports.getAmountOfChannels = exports.toChannelLayout = exports.fromSampleRate = exports.toSampleRate = exports.toSampleFormat = exports.toComposeMissingStreamBehaviour = exports.toPixelFormat = exports.toSimpleEasing = exports.toAacProfile = exports.toImageFormat = exports.toStabilizationMode = exports.toSentenceBuildMode = exports.fromBrowserEvent = exports.toSrtMode = exports.fromSrtInputState = exports.fromRtmpServerInputState = exports.toBitDepth = exports.toXilinxHevc = exports.toXilinxH264 = exports.toXilinxH264Profile = exports.toXilinxHevcProfile = exports.toXilinxHevcTier = exports.toQuadraHevc = exports.toQuadraH264 = exports.toQuadraH264Profile = exports.toQuadraHevcProfile = exports.toQuadraHevcTier = exports.toLoganHevc = exports.toLoganH264 = exports.toLoganH264Profile = exports.toLoganHevcProfile = exports.toLoganHevcTier = exports.toNvidiaH264 = exports.toNvidiaHevc = exports.toNvidiaH264Profile = exports.toNvidiaHevcProfile = exports.toNvidiaHevcTier = exports.toNvidiaPreset = exports.toNvidiaRateControl = exports.toNvidiaRateControlMode = exports.toX265Codec = exports.toX265Tune = exports.toX264Codec = exports.fromStreamMetadata = exports.metadataForStreamKey = exports.fromStreamKey = exports.mkStreamKey = exports.toMediaNodeId = exports.mkOptBool = exports.mkOptInt = void 0;
|
|
4
|
+
exports.mkWebrtcServerSettings = exports.mkEncryptionSettings = exports.fromSourceSubscriptionError = exports.fromSubscriptionError = exports.fromStreamStatistics = exports.fromAudioMeasureLevels = exports.mkDb = exports.toChannelName = void 0;
|
|
5
5
|
const media_pb_1 = require("@norskvideo/norsk-api/lib/media_pb");
|
|
6
6
|
const utils_1 = require("../shared/utils");
|
|
7
7
|
const media_pb_2 = require("@norskvideo/norsk-api/lib/media_pb");
|
|
@@ -744,6 +744,75 @@ function toQuadraHevc(codec) {
|
|
|
744
744
|
}
|
|
745
745
|
exports.toQuadraHevc = toQuadraHevc;
|
|
746
746
|
/** @internal */
|
|
747
|
+
function toXilinxHevcTier(tier) {
|
|
748
|
+
switch (tier) {
|
|
749
|
+
case "main":
|
|
750
|
+
return media_pb_1.XilinxHevc_XilinxHevcTier.MAIN;
|
|
751
|
+
case "high":
|
|
752
|
+
return media_pb_1.XilinxHevc_XilinxHevcTier.HIGH;
|
|
753
|
+
default:
|
|
754
|
+
(0, utils_1.exhaustiveCheck)(tier);
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
exports.toXilinxHevcTier = toXilinxHevcTier;
|
|
758
|
+
/** @internal */
|
|
759
|
+
function toXilinxHevcProfile(profile) {
|
|
760
|
+
switch (profile) {
|
|
761
|
+
case "main":
|
|
762
|
+
return media_pb_1.XilinxHevc_XilinxHevcProfile.MAIN;
|
|
763
|
+
case "main10":
|
|
764
|
+
return media_pb_1.XilinxHevc_XilinxHevcProfile.MAIN10;
|
|
765
|
+
default:
|
|
766
|
+
(0, utils_1.exhaustiveCheck)(profile);
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
exports.toXilinxHevcProfile = toXilinxHevcProfile;
|
|
770
|
+
/** @internal */
|
|
771
|
+
function toXilinxH264Profile(profile) {
|
|
772
|
+
switch (profile) {
|
|
773
|
+
case "baseline":
|
|
774
|
+
return media_pb_1.XilinxH264_XilinxH264Profile.BASELINE;
|
|
775
|
+
case "main":
|
|
776
|
+
return media_pb_1.XilinxH264_XilinxH264Profile.MAIN;
|
|
777
|
+
case "extended":
|
|
778
|
+
return media_pb_1.XilinxH264_XilinxH264Profile.EXTENDED;
|
|
779
|
+
case "high":
|
|
780
|
+
return media_pb_1.XilinxH264_XilinxH264Profile.HIGH;
|
|
781
|
+
case "high10":
|
|
782
|
+
return media_pb_1.XilinxH264_XilinxH264Profile.HIGH10;
|
|
783
|
+
default:
|
|
784
|
+
(0, utils_1.exhaustiveCheck)(profile);
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
exports.toXilinxH264Profile = toXilinxH264Profile;
|
|
788
|
+
/** @internal */
|
|
789
|
+
function toXilinxH264(codec) {
|
|
790
|
+
let codecOptions = {
|
|
791
|
+
profile: media_pb_1.XilinxH264_XilinxH264Profile.DEFAULT,
|
|
792
|
+
};
|
|
793
|
+
if (codec.profile !== undefined)
|
|
794
|
+
codecOptions.profile = toXilinxH264Profile(codec.profile);
|
|
795
|
+
if (codec.level !== undefined)
|
|
796
|
+
codecOptions.level = mkOptInt(codec.level * 10);
|
|
797
|
+
return (0, utils_1.provideFull)(media_pb_1.XilinxH264, codecOptions);
|
|
798
|
+
}
|
|
799
|
+
exports.toXilinxH264 = toXilinxH264;
|
|
800
|
+
/** @internal */
|
|
801
|
+
function toXilinxHevc(codec) {
|
|
802
|
+
let codecOptions = {
|
|
803
|
+
tier: media_pb_1.XilinxHevc_XilinxHevcTier.MAIN,
|
|
804
|
+
profile: media_pb_1.XilinxHevc_XilinxHevcProfile.DEFAULT,
|
|
805
|
+
};
|
|
806
|
+
if (codec.profile !== undefined)
|
|
807
|
+
codecOptions.profile = toXilinxHevcProfile(codec.profile);
|
|
808
|
+
if (codec.tier !== undefined)
|
|
809
|
+
codecOptions.tier = toXilinxHevcTier(codec.tier);
|
|
810
|
+
if (codec.level !== undefined)
|
|
811
|
+
codecOptions.level = mkOptInt(codec.level * 10);
|
|
812
|
+
return (0, utils_1.provideFull)(media_pb_1.XilinxHevc, codecOptions);
|
|
813
|
+
}
|
|
814
|
+
exports.toXilinxHevc = toXilinxHevc;
|
|
815
|
+
/** @internal */
|
|
747
816
|
function toBitDepth(bitDepth) {
|
|
748
817
|
switch (bitDepth) {
|
|
749
818
|
case 16:
|
|
@@ -1385,14 +1454,16 @@ function mkEncryptionSettings(settings) {
|
|
|
1385
1454
|
}
|
|
1386
1455
|
exports.mkEncryptionSettings = mkEncryptionSettings;
|
|
1387
1456
|
/** @internal */
|
|
1388
|
-
function
|
|
1389
|
-
if (!(settings.iceServers || settings.reportedIceServers)) {
|
|
1457
|
+
function mkWebrtcServerSettings(settings) {
|
|
1458
|
+
if (!(settings.iceServers || settings.reportedIceServers || settings.hostIps || settings.serverReflexiveIps)) {
|
|
1390
1459
|
return undefined;
|
|
1391
1460
|
}
|
|
1392
|
-
return (0, utils_1.provideFull)(media_pb_1.
|
|
1393
|
-
|
|
1394
|
-
|
|
1461
|
+
return (0, utils_1.provideFull)(media_pb_1.WebRtcConfiguration, {
|
|
1462
|
+
iceServers: (settings.iceServers || []).map((s) => (0, utils_1.provideFull)(media_pb_1.WebRtcIceServer, { urls: s.urls, username: s.username || "", credential: s.credential || "" })),
|
|
1463
|
+
reportedIceServers: (settings.reportedIceServers || []).map((s) => (0, utils_1.provideFull)(media_pb_1.WebRtcIceServer, { urls: s.urls, username: s.username || "", credential: s.credential || "" })),
|
|
1464
|
+
hostIps: settings.hostIps || [],
|
|
1465
|
+
serverReflexiveIps: settings.serverReflexiveIps || []
|
|
1395
1466
|
});
|
|
1396
1467
|
}
|
|
1397
|
-
exports.
|
|
1468
|
+
exports.mkWebrtcServerSettings = mkWebrtcServerSettings;
|
|
1398
1469
|
//# sourceMappingURL=types.js.map
|
package/lib/src/sdk.js
CHANGED
package/lib/src/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { VancPayloadFormat as VancPayloadFormatPB } from "@norskvideo/norsk-api/lib/media_pb";
|
|
1
2
|
/** @public */
|
|
2
3
|
export interface FrameRate {
|
|
3
4
|
frames: number;
|
|
@@ -45,4 +46,12 @@ export interface DeckLinkDisplayMode {
|
|
|
45
46
|
height: number;
|
|
46
47
|
frameRate: FrameRate;
|
|
47
48
|
}
|
|
49
|
+
/** @public */
|
|
50
|
+
export interface VancType2AncillaryId {
|
|
51
|
+
did: number;
|
|
52
|
+
sdid: number;
|
|
53
|
+
}
|
|
54
|
+
/** @public */
|
|
55
|
+
export declare type VancPayloadFormat = "other" | "afd_bar" | "pan_scan" | "scte104" | "dvb_scte_vbi" | "op47_sdp" | "op47_vanc_multipacket" | "ancillary_time_code" | "eia_708" | "eia_608";
|
|
56
|
+
export declare function fromVancPayloadFormat(format: VancPayloadFormatPB): VancPayloadFormat;
|
|
48
57
|
//# sourceMappingURL=types.d.ts.map
|
package/lib/src/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toDeckLinkDisplayModeId = exports.fromDeckLinkCard = exports.fromDeckLinkPixelFormat = exports.toDeckLinkPixelFormat = exports.fromVideoIOSupport = exports.toVideoIOSupport = exports.fromVideoConnection = exports.toVideoConnection = exports.fromCpuTopology = void 0;
|
|
3
|
+
exports.fromVancPayloadFormat = exports.toDeckLinkDisplayModeId = exports.fromDeckLinkCard = exports.fromDeckLinkPixelFormat = exports.toDeckLinkPixelFormat = exports.fromVideoIOSupport = exports.toVideoIOSupport = exports.fromVideoConnection = exports.toVideoConnection = exports.fromCpuTopology = void 0;
|
|
4
4
|
const media_pb_1 = require("@norskvideo/norsk-api/lib/media_pb");
|
|
5
5
|
const media_pb_2 = require("@norskvideo/norsk-api/lib/media_pb");
|
|
6
6
|
const utils_1 = require("./shared/utils");
|
|
@@ -356,4 +356,32 @@ function toDeckLinkDisplayModeId(id) {
|
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
exports.toDeckLinkDisplayModeId = toDeckLinkDisplayModeId;
|
|
359
|
+
function fromVancPayloadFormat(format) {
|
|
360
|
+
switch (format) {
|
|
361
|
+
case media_pb_2.VancPayloadFormat.VANC_AFD_BAR:
|
|
362
|
+
return "afd_bar";
|
|
363
|
+
case media_pb_2.VancPayloadFormat.VANC_PAN_SCAN:
|
|
364
|
+
return "pan_scan";
|
|
365
|
+
case media_pb_2.VancPayloadFormat.VANC_SCTE_104:
|
|
366
|
+
return "scte104";
|
|
367
|
+
case media_pb_2.VancPayloadFormat.VANC_DVB_SCTE_VBI:
|
|
368
|
+
return "dvb_scte_vbi";
|
|
369
|
+
case media_pb_2.VancPayloadFormat.VANC_OP47_SDP:
|
|
370
|
+
return "op47_sdp";
|
|
371
|
+
case media_pb_2.VancPayloadFormat.VANC_OP47_VANC_MULTIPACKET:
|
|
372
|
+
return "op47_vanc_multipacket";
|
|
373
|
+
case media_pb_2.VancPayloadFormat.VANC_ANCILLARY_TIME_CODE:
|
|
374
|
+
return "ancillary_time_code";
|
|
375
|
+
case media_pb_2.VancPayloadFormat.VANC_EIA_708D:
|
|
376
|
+
return "eia_708";
|
|
377
|
+
case media_pb_2.VancPayloadFormat.VANC_EIA_608:
|
|
378
|
+
return "eia_608";
|
|
379
|
+
case media_pb_2.VancPayloadFormat.VANC_OTHER:
|
|
380
|
+
return "other";
|
|
381
|
+
default:
|
|
382
|
+
const exhaustiveCheck = format;
|
|
383
|
+
throw new Error(`Unhandled case: ${exhaustiveCheck}`);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
exports.fromVancPayloadFormat = fromVancPayloadFormat;
|
|
359
387
|
//# sourceMappingURL=types.js.map
|