Skip to content

Commit

Permalink
apidocs: add missing recording settings to PathConf (#2705)
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 authored Nov 16, 2023
1 parent 09f43d9 commit 3277765
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 29 deletions.
36 changes: 17 additions & 19 deletions apidocs/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ components:
runOnDisconnect:
type: string

# RTSP
# RTSP server
rtsp:
type: boolean
protocols:
Expand Down Expand Up @@ -94,7 +94,7 @@ components:
items:
type: string

# RTMP
# RTMP server
rtmp:
type: boolean
rtmpAddress:
Expand All @@ -108,7 +108,7 @@ components:
rtmpServerCert:
type: string

# HLS
# HLS server
hls:
type: boolean
hlsAddress:
Expand Down Expand Up @@ -140,7 +140,7 @@ components:
hlsDirectory:
type: string

# WebRTC
# WebRTC server
webrtc:
type: boolean
webrtcAddress:
Expand Down Expand Up @@ -183,26 +183,12 @@ components:
password:
type: string

# SRT
# SRT server
srt:
type: boolean
srtAddress:
type: string

# Record
record:
type: boolean
recordPath:
type: string
recordFormat:
type: string
recordPartDuration:
type: string
recordSegmentDuration:
type: string
recordDeleteAfter:
type: string

PathConf:
type: object
properties:
Expand All @@ -224,8 +210,20 @@ components:
type: integer
srtReadPassphrase:
type: string

# Record
record:
type: boolean
recordPath:
type: string
recordFormat:
type: string
recordPartDuration:
type: string
recordSegmentDuration:
type: string
recordDeleteAfter:
type: string

# Authentication
publishUser:
Expand Down
12 changes: 6 additions & 6 deletions internal/conf/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ type Conf struct {
RunOnConnectRestart bool `json:"runOnConnectRestart"`
RunOnDisconnect string `json:"runOnDisconnect"`

// RTSP
// RTSP server
RTSP bool `json:"rtsp"`
RTSPDisable *bool `json:"rtspDisable,omitempty"` // deprecated
Protocols Protocols `json:"protocols"`
Expand All @@ -116,7 +116,7 @@ type Conf struct {
ServerCert string `json:"serverCert"`
AuthMethods AuthMethods `json:"authMethods"`

// RTMP
// RTMP server
RTMP bool `json:"rtmp"`
RTMPDisable *bool `json:"rtmpDisable,omitempty"` // deprecated
RTMPAddress string `json:"rtmpAddress"`
Expand All @@ -125,7 +125,7 @@ type Conf struct {
RTMPServerKey string `json:"rtmpServerKey"`
RTMPServerCert string `json:"rtmpServerCert"`

// HLS
// HLS server
HLS bool `json:"hls"`
HLSDisable *bool `json:"hlsDisable,omitempty"` // depreacted
HLSAddress string `json:"hlsAddress"`
Expand All @@ -142,7 +142,7 @@ type Conf struct {
HLSTrustedProxies IPsOrCIDRs `json:"hlsTrustedProxies"`
HLSDirectory string `json:"hlsDirectory"`

// WebRTC
// WebRTC server
WebRTC bool `json:"webrtc"`
WebRTCDisable *bool `json:"webrtcDisable,omitempty"` // deprecated
WebRTCAddress string `json:"webrtcAddress"`
Expand All @@ -162,11 +162,11 @@ type Conf struct {
WebRTCICEHostNAT1To1IPs *[]string `json:"webrtcICEHostNAT1To1IPs,omitempty"` // deprecated
WebRTCICEServers *[]string `json:"webrtcICEServers,omitempty"` // deprecated

// SRT
// SRT server
SRT bool `json:"srt"`
SRTAddress string `json:"srtAddress"`

// Record
// Record (deprecated)
Record *bool `json:"record,omitempty"` // deprecated
RecordPath *string `json:"recordPath,omitempty"` // deprecated
RecordFormat *RecordFormat `json:"recordFormat,omitempty"` // deprecated
Expand Down
8 changes: 4 additions & 4 deletions mediamtx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ runOnConnectRestart: no
runOnDisconnect:

###############################################
# Global settings -> RTSP
# Global settings -> RTSP server

# Allow publishing and reading streams with the RTSP protocol.
rtsp: yes
Expand Down Expand Up @@ -110,7 +110,7 @@ serverCert: server.crt
authMethods: [basic]

###############################################
# Global settings -> RTMP
# Global settings -> RTMP server

# Allow publishing and reading streams with the RTMP protocol.
rtmp: yes
Expand All @@ -130,7 +130,7 @@ rtmpServerKey: server.key
rtmpServerCert: server.crt

###############################################
# Global settings -> HLS
# Global settings -> HLS server

# Allow reading streams with the HLS protocol.
hls: yes
Expand Down Expand Up @@ -186,7 +186,7 @@ hlsTrustedProxies: []
hlsDirectory: ''

###############################################
# Global settings -> WebRTC
# Global settings -> WebRTC server

# Allow publishing and reading streams with the WebRTC protocol.
webrtc: yes
Expand Down

0 comments on commit 3277765

Please sign in to comment.