Browse Source

api: mark RTMPS connections as rtmpsConns instead of rtmpConns (#1099)

pull/1128/head
aler9 3 years ago
parent
commit
44f29c9ba3
  1. 10
      apidocs/openapi.yaml
  2. 9
      internal/core/rtmp_conn.go

10
apidocs/openapi.yaml

@ -196,6 +196,7 @@ components: @@ -196,6 +196,7 @@ components:
- $ref: '#/components/schemas/PathSourceRTSPSession'
- $ref: '#/components/schemas/PathSourceRTSPSSession'
- $ref: '#/components/schemas/PathSourceRTMPConn'
- $ref: '#/components/schemas/PathSourceRTMPSConn'
- $ref: '#/components/schemas/PathSourceRTSPSource'
- $ref: '#/components/schemas/PathSourceRTMPSource'
- $ref: '#/components/schemas/PathSourceHLSSource'
@ -255,6 +256,15 @@ components: @@ -255,6 +256,15 @@ components:
id:
type: string
PathSourceRTMPSConn:
type: object
properties:
type:
type: string
enum: [rtmpsConn]
id:
type: string
PathSourceRTSPSource:
type: object
properties:

9
internal/core/rtmp_conn.go

@ -671,8 +671,15 @@ func (c *rtmpConn) apiReaderDescribe() interface{} { @@ -671,8 +671,15 @@ func (c *rtmpConn) apiReaderDescribe() interface{} {
// apiSourceDescribe implements source.
func (c *rtmpConn) apiSourceDescribe() interface{} {
var typ string
if s.isTLS {
typ = "rtmpsConn"
} else {
typ = "rtmpConn"
}
return struct {
Type string `json:"type"`
ID string `json:"id"`
}{"rtmpConn", c.id}
}{typ, c.id}
}

Loading…
Cancel
Save