Files
googlevideo/protos/generated/video_streaming/sabr_seek.ts
Luan c240c97c23 fix(generate-proto): Use forceLong=string option
Noticed YouTube returning very large int64 values, causing the protobuf library to throw.
2025-09-14 19:58:07 -03:00

82 lines
2.3 KiB
TypeScript

// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.7.5
// protoc v5.28.0
// source: video_streaming/sabr_seek.proto
/* eslint-disable */
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
import { SeekSource } from "../misc/common.js";
export const protobufPackage = "video_streaming";
export interface SabrSeek {
seekMediaTime?: string | undefined;
seekMediaTimescale?: number | undefined;
seekSource?: SeekSource | undefined;
}
function createBaseSabrSeek(): SabrSeek {
return { seekMediaTime: "0", seekMediaTimescale: 0, seekSource: 0 };
}
export const SabrSeek: MessageFns<SabrSeek> = {
encode(message: SabrSeek, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
if (message.seekMediaTime !== undefined && message.seekMediaTime !== "0") {
writer.uint32(8).int64(message.seekMediaTime);
}
if (message.seekMediaTimescale !== undefined && message.seekMediaTimescale !== 0) {
writer.uint32(16).int32(message.seekMediaTimescale);
}
if (message.seekSource !== undefined && message.seekSource !== 0) {
writer.uint32(24).int32(message.seekSource);
}
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number): SabrSeek {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSabrSeek();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 8) {
break;
}
message.seekMediaTime = reader.int64().toString();
continue;
}
case 2: {
if (tag !== 16) {
break;
}
message.seekMediaTimescale = reader.int32();
continue;
}
case 3: {
if (tag !== 24) {
break;
}
message.seekSource = reader.int32() as any;
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
};
export interface MessageFns<T> {
encode(message: T, writer?: BinaryWriter): BinaryWriter;
decode(input: BinaryReader | Uint8Array, length?: number): T;
}