forked from External/mediamtx
support publishing, reading, proxying with SRT (#2068)
This commit is contained in:
parent
d696a782f7
commit
b4e3033ea3
22 changed files with 2184 additions and 213 deletions
|
|
@ -169,6 +169,12 @@ components:
|
|||
webrtcICETCPMuxAddress:
|
||||
type: string
|
||||
|
||||
# srt
|
||||
srt:
|
||||
type: boolean
|
||||
srtAddress:
|
||||
type: string
|
||||
|
||||
# paths
|
||||
paths:
|
||||
type: object
|
||||
|
|
@ -348,6 +354,16 @@ components:
|
|||
items:
|
||||
$ref: '#/components/schemas/PathSourceOrReader'
|
||||
|
||||
PathsList:
|
||||
type: object
|
||||
properties:
|
||||
pageCount:
|
||||
type: integer
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Path'
|
||||
|
||||
PathSourceOrReader:
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -356,6 +372,7 @@ components:
|
|||
enum:
|
||||
- hlsMuxer
|
||||
- hlsSource
|
||||
- redirect
|
||||
- rpiCameraSource
|
||||
- rtmpConn
|
||||
- rtmpSource
|
||||
|
|
@ -363,70 +380,13 @@ components:
|
|||
- rtspSession
|
||||
- rtspSource
|
||||
- rtspsSession
|
||||
- redirect
|
||||
- srtConn
|
||||
- srtSource
|
||||
- udpSource
|
||||
- webRTCSession
|
||||
id:
|
||||
type: string
|
||||
|
||||
RTSPConn:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
created:
|
||||
type: string
|
||||
remoteAddr:
|
||||
type: string
|
||||
bytesReceived:
|
||||
type: integer
|
||||
format: int64
|
||||
bytesSent:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
RTSPSession:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
created:
|
||||
type: string
|
||||
remoteAddr:
|
||||
type: string
|
||||
state:
|
||||
type: string
|
||||
enum: [idle, read, publish]
|
||||
path:
|
||||
type: string
|
||||
bytesReceived:
|
||||
type: integer
|
||||
format: int64
|
||||
bytesSent:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
RTMPConn:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
created:
|
||||
type: string
|
||||
remoteAddr:
|
||||
type: string
|
||||
state:
|
||||
type: string
|
||||
enum: [idle, read, publish]
|
||||
path:
|
||||
type: string
|
||||
bytesReceived:
|
||||
type: integer
|
||||
format: int64
|
||||
bytesSent:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
HLSMuxer:
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -450,15 +410,26 @@ components:
|
|||
items:
|
||||
$ref: '#/components/schemas/HLSMuxer'
|
||||
|
||||
PathsList:
|
||||
RTMPConn:
|
||||
type: object
|
||||
properties:
|
||||
pageCount:
|
||||
id:
|
||||
type: string
|
||||
created:
|
||||
type: string
|
||||
remoteAddr:
|
||||
type: string
|
||||
state:
|
||||
type: string
|
||||
enum: [idle, read, publish]
|
||||
path:
|
||||
type: string
|
||||
bytesReceived:
|
||||
type: integer
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Path'
|
||||
format: int64
|
||||
bytesSent:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
RTMPConnsList:
|
||||
type: object
|
||||
|
|
@ -470,6 +441,22 @@ components:
|
|||
items:
|
||||
$ref: '#/components/schemas/RTMPConn'
|
||||
|
||||
RTSPConn:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
created:
|
||||
type: string
|
||||
remoteAddr:
|
||||
type: string
|
||||
bytesReceived:
|
||||
type: integer
|
||||
format: int64
|
||||
bytesSent:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
RTSPConnsList:
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -480,6 +467,27 @@ components:
|
|||
items:
|
||||
$ref: '#/components/schemas/RTSPConn'
|
||||
|
||||
RTSPSession:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
created:
|
||||
type: string
|
||||
remoteAddr:
|
||||
type: string
|
||||
state:
|
||||
type: string
|
||||
enum: [idle, read, publish]
|
||||
path:
|
||||
type: string
|
||||
bytesReceived:
|
||||
type: integer
|
||||
format: int64
|
||||
bytesSent:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
RTSPSessionsList:
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -490,6 +498,37 @@ components:
|
|||
items:
|
||||
$ref: '#/components/schemas/RTSPSession'
|
||||
|
||||
SRTConn:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
created:
|
||||
type: string
|
||||
remoteAddr:
|
||||
type: string
|
||||
state:
|
||||
type: string
|
||||
enum: [idle, read, publish]
|
||||
path:
|
||||
type: string
|
||||
bytesReceived:
|
||||
type: integer
|
||||
format: int64
|
||||
bytesSent:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
SRTConnsList:
|
||||
type: object
|
||||
properties:
|
||||
pageCount:
|
||||
type: integer
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/SRTConn'
|
||||
|
||||
WebRTCSession:
|
||||
type: object
|
||||
properties:
|
||||
|
|
@ -1178,6 +1217,84 @@ paths:
|
|||
'500':
|
||||
description: internal server error.
|
||||
|
||||
/v2/srtconns/list:
|
||||
get:
|
||||
operationId: srtConnsList
|
||||
summary: returns all SRT connections.
|
||||
description: ''
|
||||
parameters:
|
||||
- name: page
|
||||
in: query
|
||||
description: page number.
|
||||
schema:
|
||||
type: number
|
||||
default: 0
|
||||
- name: itemsPerPage
|
||||
in: query
|
||||
description: items per page.
|
||||
schema:
|
||||
type: number
|
||||
default: 100
|
||||
responses:
|
||||
'200':
|
||||
description: the request was successful.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/SRTConnsList'
|
||||
'400':
|
||||
description: invalid request.
|
||||
'500':
|
||||
description: internal server error.
|
||||
|
||||
/v2/srtconns/get/{id}:
|
||||
get:
|
||||
operationId: srtConnsGet
|
||||
summary: returns a SRT connection.
|
||||
description: ''
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
description: ID of the connection.
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: the request was successful.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/SRTConn'
|
||||
'400':
|
||||
description: invalid request.
|
||||
'404':
|
||||
description: connection not found.
|
||||
'500':
|
||||
description: internal server error.
|
||||
|
||||
/v2/srtconns/kick/{id}:
|
||||
post:
|
||||
operationId: srtConnsKick
|
||||
summary: kicks out a SRT connection from the server.
|
||||
description: ''
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
description: ID of the connection.
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: the request was successful.
|
||||
'400':
|
||||
description: invalid request.
|
||||
'404':
|
||||
description: connection not found.
|
||||
'500':
|
||||
description: internal server error.
|
||||
|
||||
/v2/webrtcsessions/list:
|
||||
get:
|
||||
operationId: webrtcSessionsList
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue