Skip to content

Commit

Permalink
Merge pull request #294 from dfpc-coe/video-paths
Browse files Browse the repository at this point in the history
Video Paths
  • Loading branch information
ingalls authored Aug 26, 2024
2 parents 0d17964 + 5b6cb1f commit 6603ec5
Show file tree
Hide file tree
Showing 18 changed files with 2,545 additions and 155 deletions.
22 changes: 21 additions & 1 deletion api/lib/control/video-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,34 @@ import fetch from '../fetch.js';

export const VideoConfig = Type.Object({
api: Type.Boolean(),
apiAddress: Type.String(),

metrics: Type.Boolean(),
metricsAddress: Type.String(),

pprof: Type.Boolean(),
pprofAddress: Type.String(),

playback: Type.Boolean(),
playbackAddress: Type.String(),

rtsp: Type.Boolean(),
rtspAddress: Type.String(),
rtspsAddress: Type.String(),
rtspAuthMethods: Type.Array(Type.String()),

rtmp: Type.Boolean(),
rtmpAddress: Type.String(),
rtmpsAddress: Type.String(),

hls: Type.Boolean(),
hlsAddress: Type.String(),

webrtc: Type.Boolean(),
srt: Type.Boolean()
webrtcAddress: Type.String(),

srt: Type.Boolean(),
srtAddress: Type.String(),
})

export const PathConfig = Type.Object({
Expand Down
4 changes: 3 additions & 1 deletion api/lib/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ export const VideoLease = pgTable('video_lease', {
updated: timestamp('updated', { withTimezone: true, mode: 'string' }).notNull().default(sql`Now()`),
username: text('username').notNull().references(() => Profile.username),
expiration: timestamp('expiration', { withTimezone: true, mode: 'string' }).notNull().default(sql`Now() + INTERVAL 1 HOUR;`),
path: text('path').notNull()
path: text('path').notNull(),
stream_user: text('stream_user'),
stream_pass: text('stream_pass')
});

export const ProfileFeature = pgTable('profile_features', {
Expand Down
2 changes: 2 additions & 0 deletions api/migrations/0056_round_galactus.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE "video_lease" ADD COLUMN "stream_user" text;--> statement-breakpoint
ALTER TABLE "video_lease" ADD COLUMN "stream_pass" text;
Loading

0 comments on commit 6603ec5

Please sign in to comment.