diff options
Diffstat (limited to 'shared/models/server')
-rw-r--r-- | shared/models/server/custom-config.model.ts | 7 | ||||
-rw-r--r-- | shared/models/server/job.model.ts | 43 | ||||
-rw-r--r-- | shared/models/server/server-config.model.ts | 8 | ||||
-rw-r--r-- | shared/models/server/server-error-code.enum.ts | 5 |
4 files changed, 54 insertions, 9 deletions
diff --git a/shared/models/server/custom-config.model.ts b/shared/models/server/custom-config.model.ts index 6ffe3a676..5d2c10278 100644 --- a/shared/models/server/custom-config.model.ts +++ b/shared/models/server/custom-config.model.ts | |||
@@ -116,6 +116,10 @@ export interface CustomConfig { | |||
116 | allowAdditionalExtensions: boolean | 116 | allowAdditionalExtensions: boolean |
117 | allowAudioFiles: boolean | 117 | allowAudioFiles: boolean |
118 | 118 | ||
119 | remoteRunners: { | ||
120 | enabled: boolean | ||
121 | } | ||
122 | |||
119 | threads: number | 123 | threads: number |
120 | concurrency: number | 124 | concurrency: number |
121 | 125 | ||
@@ -149,6 +153,9 @@ export interface CustomConfig { | |||
149 | 153 | ||
150 | transcoding: { | 154 | transcoding: { |
151 | enabled: boolean | 155 | enabled: boolean |
156 | remoteRunners: { | ||
157 | enabled: boolean | ||
158 | } | ||
152 | threads: number | 159 | threads: number |
153 | profile: string | 160 | profile: string |
154 | resolutions: ConfigResolutions | 161 | resolutions: ConfigResolutions |
diff --git a/shared/models/server/job.model.ts b/shared/models/server/job.model.ts index 9c0b5ea56..16187d133 100644 --- a/shared/models/server/job.model.ts +++ b/shared/models/server/job.model.ts | |||
@@ -18,6 +18,7 @@ export type JobType = | |||
18 | | 'after-video-channel-import' | 18 | | 'after-video-channel-import' |
19 | | 'email' | 19 | | 'email' |
20 | | 'federate-video' | 20 | | 'federate-video' |
21 | | 'transcoding-job-builder' | ||
21 | | 'manage-video-torrent' | 22 | | 'manage-video-torrent' |
22 | | 'move-to-object-storage' | 23 | | 'move-to-object-storage' |
23 | | 'notify' | 24 | | 'notify' |
@@ -41,6 +42,10 @@ export interface Job { | |||
41 | createdAt: Date | string | 42 | createdAt: Date | string |
42 | finishedOn: Date | string | 43 | finishedOn: Date | string |
43 | processedOn: Date | string | 44 | processedOn: Date | string |
45 | |||
46 | parent?: { | ||
47 | id: string | ||
48 | } | ||
44 | } | 49 | } |
45 | 50 | ||
46 | export type ActivitypubHttpBroadcastPayload = { | 51 | export type ActivitypubHttpBroadcastPayload = { |
@@ -139,30 +144,28 @@ interface BaseTranscodingPayload { | |||
139 | export interface HLSTranscodingPayload extends BaseTranscodingPayload { | 144 | export interface HLSTranscodingPayload extends BaseTranscodingPayload { |
140 | type: 'new-resolution-to-hls' | 145 | type: 'new-resolution-to-hls' |
141 | resolution: VideoResolution | 146 | resolution: VideoResolution |
147 | fps: number | ||
142 | copyCodecs: boolean | 148 | copyCodecs: boolean |
143 | 149 | ||
144 | hasAudio: boolean | 150 | deleteWebTorrentFiles: boolean |
145 | |||
146 | autoDeleteWebTorrentIfNeeded: boolean | ||
147 | isMaxQuality: boolean | ||
148 | } | 151 | } |
149 | 152 | ||
150 | export interface NewWebTorrentResolutionTranscodingPayload extends BaseTranscodingPayload { | 153 | export interface NewWebTorrentResolutionTranscodingPayload extends BaseTranscodingPayload { |
151 | type: 'new-resolution-to-webtorrent' | 154 | type: 'new-resolution-to-webtorrent' |
152 | resolution: VideoResolution | 155 | resolution: VideoResolution |
153 | 156 | fps: number | |
154 | hasAudio: boolean | ||
155 | createHLSIfNeeded: boolean | ||
156 | } | 157 | } |
157 | 158 | ||
158 | export interface MergeAudioTranscodingPayload extends BaseTranscodingPayload { | 159 | export interface MergeAudioTranscodingPayload extends BaseTranscodingPayload { |
159 | type: 'merge-audio-to-webtorrent' | 160 | type: 'merge-audio-to-webtorrent' |
160 | resolution: VideoResolution | 161 | resolution: VideoResolution |
161 | createHLSIfNeeded: true | 162 | fps: number |
162 | } | 163 | } |
163 | 164 | ||
164 | export interface OptimizeTranscodingPayload extends BaseTranscodingPayload { | 165 | export interface OptimizeTranscodingPayload extends BaseTranscodingPayload { |
165 | type: 'optimize-to-webtorrent' | 166 | type: 'optimize-to-webtorrent' |
167 | |||
168 | quickTranscode: boolean | ||
166 | } | 169 | } |
167 | 170 | ||
168 | export type VideoTranscodingPayload = | 171 | export type VideoTranscodingPayload = |
@@ -258,3 +261,27 @@ export interface FederateVideoPayload { | |||
258 | videoUUID: string | 261 | videoUUID: string |
259 | isNewVideo: boolean | 262 | isNewVideo: boolean |
260 | } | 263 | } |
264 | |||
265 | // --------------------------------------------------------------------------- | ||
266 | |||
267 | export interface TranscodingJobBuilderPayload { | ||
268 | videoUUID: string | ||
269 | |||
270 | optimizeJob?: { | ||
271 | isNewVideo: boolean | ||
272 | } | ||
273 | |||
274 | // Array of jobs to create | ||
275 | jobs?: { | ||
276 | type: 'video-transcoding' | ||
277 | payload: VideoTranscodingPayload | ||
278 | priority?: number | ||
279 | }[] | ||
280 | |||
281 | // Array of sequential jobs to create | ||
282 | sequentialJobs?: { | ||
283 | type: 'video-transcoding' | ||
284 | payload: VideoTranscodingPayload | ||
285 | priority?: number | ||
286 | }[][] | ||
287 | } | ||
diff --git a/shared/models/server/server-config.model.ts b/shared/models/server/server-config.model.ts index d0bd9a00f..38b9d0385 100644 --- a/shared/models/server/server-config.model.ts +++ b/shared/models/server/server-config.model.ts | |||
@@ -148,6 +148,10 @@ export interface ServerConfig { | |||
148 | 148 | ||
149 | profile: string | 149 | profile: string |
150 | availableProfiles: string[] | 150 | availableProfiles: string[] |
151 | |||
152 | remoteRunners: { | ||
153 | enabled: boolean | ||
154 | } | ||
151 | } | 155 | } |
152 | 156 | ||
153 | live: { | 157 | live: { |
@@ -165,6 +169,10 @@ export interface ServerConfig { | |||
165 | transcoding: { | 169 | transcoding: { |
166 | enabled: boolean | 170 | enabled: boolean |
167 | 171 | ||
172 | remoteRunners: { | ||
173 | enabled: boolean | ||
174 | } | ||
175 | |||
168 | enabledResolutions: number[] | 176 | enabledResolutions: number[] |
169 | 177 | ||
170 | profile: string | 178 | profile: string |
diff --git a/shared/models/server/server-error-code.enum.ts b/shared/models/server/server-error-code.enum.ts index a39cde1b3..24d3c6d21 100644 --- a/shared/models/server/server-error-code.enum.ts +++ b/shared/models/server/server-error-code.enum.ts | |||
@@ -45,7 +45,10 @@ export const enum ServerErrorCode { | |||
45 | INVALID_TWO_FACTOR = 'invalid_two_factor', | 45 | INVALID_TWO_FACTOR = 'invalid_two_factor', |
46 | 46 | ||
47 | ACCOUNT_WAITING_FOR_APPROVAL = 'account_waiting_for_approval', | 47 | ACCOUNT_WAITING_FOR_APPROVAL = 'account_waiting_for_approval', |
48 | ACCOUNT_APPROVAL_REJECTED = 'account_approval_rejected' | 48 | ACCOUNT_APPROVAL_REJECTED = 'account_approval_rejected', |
49 | |||
50 | RUNNER_JOB_NOT_IN_PROCESSING_STATE = 'runner_job_not_in_processing_state', | ||
51 | UNKNOWN_RUNNER_TOKEN = 'unknown_runner_token' | ||
49 | } | 52 | } |
50 | 53 | ||
51 | /** | 54 | /** |