2023-08-01 03:28:07 +02:00
|
|
|
import { AudioStreamInfo, VideoFormat, VideoInfo, VideoStreamInfo } from '@app/domain';
|
|
|
|
|
|
|
|
const probeStubDefaultFormat: VideoFormat = {
|
|
|
|
formatName: 'mov,mp4,m4a,3gp,3g2,mj2',
|
|
|
|
formatLongName: 'QuickTime / MOV',
|
|
|
|
duration: 0,
|
|
|
|
};
|
|
|
|
|
|
|
|
const probeStubDefaultVideoStream: VideoStreamInfo[] = [
|
2023-08-29 11:01:42 +02:00
|
|
|
{
|
|
|
|
index: 0,
|
|
|
|
height: 1080,
|
|
|
|
width: 1920,
|
|
|
|
codecName: 'hevc',
|
|
|
|
codecType: 'video',
|
|
|
|
frameCount: 100,
|
|
|
|
rotation: 0,
|
|
|
|
isHDR: false,
|
|
|
|
},
|
2023-08-01 03:28:07 +02:00
|
|
|
];
|
|
|
|
|
2023-08-29 11:01:42 +02:00
|
|
|
const probeStubDefaultAudioStream: AudioStreamInfo[] = [
|
2023-09-03 03:22:42 +02:00
|
|
|
{ index: 1, codecName: 'aac', codecType: 'audio', frameCount: 100 },
|
2023-08-29 11:01:42 +02:00
|
|
|
];
|
2023-08-01 03:28:07 +02:00
|
|
|
|
|
|
|
const probeStubDefault: VideoInfo = {
|
|
|
|
format: probeStubDefaultFormat,
|
|
|
|
videoStreams: probeStubDefaultVideoStream,
|
|
|
|
audioStreams: probeStubDefaultAudioStream,
|
|
|
|
};
|
|
|
|
|
|
|
|
export const probeStub = {
|
|
|
|
noVideoStreams: Object.freeze<VideoInfo>({ ...probeStubDefault, videoStreams: [] }),
|
2023-08-02 03:56:10 +02:00
|
|
|
noAudioStreams: Object.freeze<VideoInfo>({ ...probeStubDefault, audioStreams: [] }),
|
2023-08-01 03:28:07 +02:00
|
|
|
multipleVideoStreams: Object.freeze<VideoInfo>({
|
|
|
|
...probeStubDefault,
|
|
|
|
videoStreams: [
|
|
|
|
{
|
2023-08-29 11:01:42 +02:00
|
|
|
index: 0,
|
2023-08-01 03:28:07 +02:00
|
|
|
height: 1080,
|
|
|
|
width: 400,
|
2023-08-02 03:56:10 +02:00
|
|
|
codecName: 'hevc',
|
2023-08-01 03:28:07 +02:00
|
|
|
codecType: 'video',
|
|
|
|
frameCount: 100,
|
|
|
|
rotation: 0,
|
2023-08-07 22:35:25 +02:00
|
|
|
isHDR: false,
|
2023-08-01 03:28:07 +02:00
|
|
|
},
|
|
|
|
{
|
2023-08-29 11:01:42 +02:00
|
|
|
index: 1,
|
2023-08-01 03:28:07 +02:00
|
|
|
height: 1080,
|
|
|
|
width: 400,
|
|
|
|
codecName: 'h7000',
|
|
|
|
codecType: 'video',
|
|
|
|
frameCount: 99,
|
|
|
|
rotation: 0,
|
2023-08-07 22:35:25 +02:00
|
|
|
isHDR: false,
|
2023-08-01 03:28:07 +02:00
|
|
|
},
|
|
|
|
],
|
|
|
|
}),
|
|
|
|
noHeight: Object.freeze<VideoInfo>({
|
|
|
|
...probeStubDefault,
|
|
|
|
videoStreams: [
|
|
|
|
{
|
2023-08-29 11:01:42 +02:00
|
|
|
index: 0,
|
2023-08-01 03:28:07 +02:00
|
|
|
height: 0,
|
|
|
|
width: 400,
|
2023-08-02 03:56:10 +02:00
|
|
|
codecName: 'hevc',
|
2023-08-01 03:28:07 +02:00
|
|
|
codecType: 'video',
|
|
|
|
frameCount: 100,
|
|
|
|
rotation: 0,
|
2023-08-07 22:35:25 +02:00
|
|
|
isHDR: false,
|
2023-08-01 03:28:07 +02:00
|
|
|
},
|
|
|
|
],
|
|
|
|
}),
|
|
|
|
videoStream2160p: Object.freeze<VideoInfo>({
|
|
|
|
...probeStubDefault,
|
|
|
|
videoStreams: [
|
|
|
|
{
|
2023-08-29 11:01:42 +02:00
|
|
|
index: 0,
|
2023-08-01 03:28:07 +02:00
|
|
|
height: 2160,
|
|
|
|
width: 3840,
|
|
|
|
codecName: 'h264',
|
|
|
|
codecType: 'video',
|
|
|
|
frameCount: 100,
|
|
|
|
rotation: 0,
|
2023-08-07 22:35:25 +02:00
|
|
|
isHDR: false,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}),
|
|
|
|
videoStreamHDR: Object.freeze<VideoInfo>({
|
|
|
|
...probeStubDefault,
|
|
|
|
videoStreams: [
|
|
|
|
{
|
2023-08-29 11:01:42 +02:00
|
|
|
index: 0,
|
2023-08-07 22:35:25 +02:00
|
|
|
height: 480,
|
|
|
|
width: 480,
|
|
|
|
codecName: 'h264',
|
|
|
|
codecType: 'video',
|
|
|
|
frameCount: 100,
|
|
|
|
rotation: 0,
|
|
|
|
isHDR: true,
|
2023-08-01 03:28:07 +02:00
|
|
|
},
|
|
|
|
],
|
|
|
|
}),
|
|
|
|
videoStreamVertical2160p: Object.freeze<VideoInfo>({
|
|
|
|
...probeStubDefault,
|
|
|
|
videoStreams: [
|
|
|
|
{
|
2023-08-29 11:01:42 +02:00
|
|
|
index: 0,
|
2023-08-01 03:28:07 +02:00
|
|
|
height: 2160,
|
|
|
|
width: 3840,
|
|
|
|
codecName: 'h264',
|
|
|
|
codecType: 'video',
|
|
|
|
frameCount: 100,
|
|
|
|
rotation: 90,
|
2023-08-07 22:35:25 +02:00
|
|
|
isHDR: false,
|
2023-08-01 03:28:07 +02:00
|
|
|
},
|
|
|
|
],
|
|
|
|
}),
|
|
|
|
audioStreamMp3: Object.freeze<VideoInfo>({
|
|
|
|
...probeStubDefault,
|
2023-09-03 03:22:42 +02:00
|
|
|
audioStreams: [{ index: 1, codecType: 'audio', codecName: 'aac', frameCount: 100 }],
|
2023-08-01 03:28:07 +02:00
|
|
|
}),
|
|
|
|
matroskaContainer: Object.freeze<VideoInfo>({
|
|
|
|
...probeStubDefault,
|
|
|
|
format: {
|
|
|
|
formatName: 'matroska,webm',
|
|
|
|
formatLongName: 'Matroska / WebM',
|
|
|
|
duration: 0,
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
};
|