Skip to content

Commit 24c748f

Browse files
authored
Merge branch 'dev' into enh/add-reactions
2 parents c9a5356 + 2140cdf commit 24c748f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1709
-1869
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
*.go text eol=lf
2+
# Always use LF for all text files
3+
* text=auto eol=lf
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build & Deploy rtmp-proxy
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- '*'
8+
9+
permissions:
10+
packages: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
module: ["rtmp-proxy"]
18+
19+
steps:
20+
- name: get container name
21+
run: |
22+
echo "containername=${{ matrix.module }}" | sed 's/\//-/g' > $GITHUB_ENV
23+
- uses: actions/checkout@v4
24+
with:
25+
ref: ${{ github.event.pull_request.head.sha }}
26+
- name: Docker meta (${{ matrix.module }})
27+
id: meta
28+
uses: docker/metadata-action@v5
29+
with:
30+
images: ghcr.io/tum-dev/gocast/${{ env.containername }}
31+
tags: |
32+
type=ref,event=branch
33+
type=ref,event=pr
34+
type=semver,pattern={{version}}
35+
type=sha
36+
flavor: |
37+
latest=true
38+
prefix=
39+
suffix=
40+
- name: Set up Docker Buildx
41+
uses: docker/setup-buildx-action@v3
42+
- name: Login to DockerHub
43+
uses: docker/login-action@v3
44+
with:
45+
registry: ghcr.io
46+
username: ${{ github.actor }}
47+
password: ${{ secrets.GITHUB_TOKEN }}
48+
- name: Set outputs
49+
id: vars
50+
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
51+
- name: Build and push Docker images (${{ matrix.module }})
52+
uses: docker/build-push-action@v6
53+
with:
54+
context: ./${{ matrix.module }}
55+
pull: true
56+
push: true
57+
build-args: version=${{ github.ref_name }}
58+
tags: ${{ steps.meta.outputs.tags }}
59+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/deploy-runners.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55
push:
66
tags:
7-
- '*beta*'
7+
- '*'
88

99
permissions:
1010
packages: write
@@ -38,7 +38,7 @@ jobs:
3838
prefix=
3939
suffix=
4040
- name: Set up Docker Buildx
41-
uses: docker/setup-buildx-action@v2
41+
uses: docker/setup-buildx-action@v3
4242
- name: Login to DockerHub
4343
uses: docker/login-action@v3
4444
with:

.github/workflows/deploy-server.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
prefix=
3131
suffix=
3232
- name: Set up Docker Buildx
33-
uses: docker/setup-buildx-action@v2
33+
uses: docker/setup-buildx-action@v3
3434
- name: Login to registry
3535
uses: docker/login-action@v3
3636
with:

.github/workflows/deploy-workers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
prefix=
3939
suffix=
4040
- name: Set up Docker Buildx
41-
uses: docker/setup-buildx-action@v2
41+
uses: docker/setup-buildx-action@v3
4242
- name: Login to DockerHub
4343
uses: docker/login-action@v3
4444
with:

.github/workflows/golangci-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: lint
1212
runs-on: ubuntu-latest
1313
strategy:
14-
matrix: { dir: ['./...', './worker', './worker/edge'] }
14+
matrix: { dir: ['./...', './worker', './worker/edge', './runner'] }
1515
steps:
1616
- uses: actions/setup-go@v5
1717
with:

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:23 AS node
1+
FROM node:24 AS node
22

33
WORKDIR /app
44
COPY web web
@@ -10,7 +10,7 @@ RUN rm -rf web/assets/ts-dist &&\
1010
WORKDIR /app/web
1111
RUN npm i --no-dev
1212

13-
FROM golang:1.24.1-alpine3.21 AS build-env
13+
FROM golang:1.24.3-alpine3.21 AS build-env
1414

1515
RUN mkdir /gostuff
1616
WORKDIR /gostuff
@@ -28,7 +28,7 @@ COPY --from=node /app/web/node_modules ./web/node_modules
2828
ARG version=dev
2929
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-w -extldflags '-static' -X main.VersionTag=${version}" -o /go/bin/tumlive cmd/tumlive/tumlive.go
3030

31-
FROM alpine:3.21
31+
FROM alpine:3.22
3232
RUN apk add --no-cache tzdata openssl
3333
WORKDIR /app
3434
COPY --from=build-env /go/bin/tumlive .

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
TUMs lecture streaming service, currently serving up to 100 courses every semester with up to 2000 active students.
77

88
Features include:
9-
- Automatic lecture scheduling and access management coupled with [CAMPUSOnline](https://www.tugraz.at/tu-graz/organisationsstruktur/serviceeinrichtungen-und-stabsstellen/campusonline/)
9+
- Automatic lecture scheduling and access management coupled with [CAMPUSOnline](https://www.campusonline.tugraz.at)
1010
- Livestreaming from lecture halls
1111
- Support for Extron SMPs and automatic backup recordings on them.
1212
- Support for preset management on ip cameras

api/lecture_halls.go

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@ type lectureHallRoutes struct {
4747
}
4848

4949
type updateLectureHallReq struct {
50-
CamIp string `json:"camIp"`
51-
CombIp string `json:"combIp"`
52-
PresIP string `json:"presIp"`
53-
CameraIp string `json:"cameraIp"`
54-
PwrCtrlIp string `json:"pwrCtrlIp"`
50+
StreamProtocol int `json:"streamProtocol"`
51+
CamIp string `json:"camIp"`
52+
CombIp string `json:"combIp"`
53+
PresIP string `json:"presIp"`
54+
CameraIp string `json:"cameraIp"`
55+
PwrCtrlIp string `json:"pwrCtrlIp"`
5556
}
5657

5758
func (r lectureHallRoutes) updateLectureHall(c *gin.Context) {
@@ -84,6 +85,8 @@ func (r lectureHallRoutes) updateLectureHall(c *gin.Context) {
8485
})
8586
return
8687
}
88+
lectureHall.StreamProtocol = model.StreamProtocol(req.StreamProtocol)
89+
logger.Debug("New stream protocol", "protocol", lectureHall.StreamProtocol)
8790
lectureHall.CamIP = req.CamIp
8891
lectureHall.CombIP = req.CombIp
8992
lectureHall.PresIP = req.PresIP
@@ -357,6 +360,7 @@ func (r lectureHallRoutes) createLectureHall(c *gin.Context) {
357360
var req createLectureHallRequest
358361
err := c.BindJSON(&req)
359362
if err != nil {
363+
logger.Error("can not bind body", "err", err)
360364
_ = c.Error(tools.RequestError{
361365
Status: http.StatusBadRequest,
362366
CustomMessage: "can not bind body",
@@ -365,22 +369,24 @@ func (r lectureHallRoutes) createLectureHall(c *gin.Context) {
365369
return
366370
}
367371
r.LectureHallsDao.CreateLectureHall(model.LectureHall{
368-
Name: req.Name,
369-
CombIP: req.CombIP,
370-
PresIP: req.PresIP,
371-
CamIP: req.CamIP,
372-
CameraIP: req.CameraIP,
373-
PwrCtrlIp: req.PwrCtrlIP,
372+
Name: req.Name,
373+
StreamProtocol: model.StreamProtocol(req.StreamProtocol),
374+
CombIP: req.CombIP,
375+
PresIP: req.PresIP,
376+
CamIP: req.CamIP,
377+
CameraIP: req.CameraIP,
378+
PwrCtrlIp: req.PwrCtrlIP,
374379
})
375380
}
376381

377382
type createLectureHallRequest struct {
378-
Name string `json:"name"`
379-
CombIP string `json:"combIP"`
380-
PresIP string `json:"presIP"`
381-
CamIP string `json:"camIP"`
382-
CameraIP string `json:"cameraIP"`
383-
PwrCtrlIP string `json:"pwrCtrlIp"`
383+
Name string `json:"name"`
384+
StreamProtocol int `json:"streamProtocol"` // 1 = rtmp, 2 = srt
385+
CombIP string `json:"combIP"`
386+
PresIP string `json:"presIP"`
387+
CamIP string `json:"camIP"`
388+
CameraIP string `json:"cameraIP"`
389+
PwrCtrlIP string `json:"pwrCtrlIp"`
384390
}
385391

386392
type setLectureHallRequest struct {

api/lecture_halls_test.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,13 @@ func TestLectureHallsCRUD(t *testing.T) {
3434
ctrl := gomock.NewController(t)
3535

3636
body := createLectureHallRequest{
37-
Name: "LH1",
38-
CombIP: "0.0.0.0",
39-
PresIP: "0.0.0.0",
40-
CamIP: "0.0.0.0",
41-
CameraIP: "0.0.0.0",
42-
PwrCtrlIP: "0.0.0.0",
37+
Name: "LH1",
38+
StreamProtocol: 1,
39+
CombIP: "0.0.0.0",
40+
PresIP: "0.0.0.0",
41+
CamIP: "0.0.0.0",
42+
CameraIP: "0.0.0.0",
43+
PwrCtrlIP: "0.0.0.0",
4344
}
4445

4546
gomino.TestCases{

0 commit comments

Comments
 (0)