diff --git a/src/__tests__/connection.spec.ts b/src/__tests__/connection.spec.ts index 73dbca11..119e1202 100644 --- a/src/__tests__/connection.spec.ts +++ b/src/__tests__/connection.spec.ts @@ -12,7 +12,7 @@ jest.mock('net') const SocketMock = OrgSocket as any as typeof MockSocket const PARSED_INFO_CHANNEL_720p50 = { channel: 1, - format: 720, + format: '720p5000', frameRate: 50, channelRate: 50, interlaced: false, diff --git a/src/__tests__/deserializers.spec.ts b/src/__tests__/deserializers.spec.ts index 7758b3ed..2418c72e 100644 --- a/src/__tests__/deserializers.spec.ts +++ b/src/__tests__/deserializers.spec.ts @@ -106,7 +106,7 @@ describe('deserializers', () => { expect(output[0]).toMatchObject( literal({ channel: 1, - format: 720, + format: '720p5000', channelRate: 50, frameRate: 50, interlaced: false, @@ -116,7 +116,7 @@ describe('deserializers', () => { expect(output[1]).toMatchObject( literal({ channel: 2, - format: 1080, + format: '1080i5000', channelRate: 50, frameRate: 50, interlaced: true, diff --git a/src/deserializers/deserializeInfo.ts b/src/deserializers/deserializeInfo.ts index b549b921..67d0eab7 100644 --- a/src/deserializers/deserializeInfo.ts +++ b/src/deserializers/deserializeInfo.ts @@ -6,7 +6,7 @@ export const deserializeInfo = (line: string): InfoEntry | undefined => { if (info && info.groups) { return { channel: parseInt(info.groups.ChannelNo, 10), - format: parseInt(info.groups.Format, 10), + format: info.groups.Format, channelRate: parseInt(info.groups.Channelrate || '', 10) / 100, frameRate: parseInt(info.groups.Channelrate || '', 10) / 100, interlaced: info.groups.Interlaced === 'i', diff --git a/src/parameters.ts b/src/parameters.ts index dfa7e3f9..aee84868 100644 --- a/src/parameters.ts +++ b/src/parameters.ts @@ -315,7 +315,7 @@ export interface VersionInfo { export type InfoParameters = Empty export interface InfoEntry { channel: number - format: number + format: string channelRate: number frameRate: number interlaced: boolean