Skip to content

Commit

Permalink
api: add pagination to all /list endpoints (#1808)
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 authored May 16, 2023
1 parent bf4d6c9 commit 9c79197
Show file tree
Hide file tree
Showing 13 changed files with 388 additions and 130 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@ Live streams can be published to the server with:

|protocol|variants|video codecs|audio codecs|
|--------|--------|------------|------------|
|RTSP clients (FFmpeg, GStreamer)|UDP, TCP, RTSPS|AV1, VP9, VP8, H265, H264, MPEG-4 Video (H263, Xvid), MPEG-2 Video, M-JPEG and any RTP-compatible codec|Opus, MPEG-4 Audio (AAC), MPEG-2 Audio (MP3), G722, G711, LPCM and any RTP-compatible codec|
|RTSP servers and cameras|UDP, UDP-Multicast, TCP, RTSPS|AV1, VP9, VP8, H265, H264, MPEG-4 Video (H263, Xvid), MPEG-2 Video, M-JPEG and any RTP-compatible codec|Opus, MPEG-4 Audio (AAC), MPEG-2 Audio (MP3), G722, G711, LPCM and any RTP-compatible codec|
|WebRTC|WHIP|AV1, VP9, VP8, H264|Opus, G722, G711|
|RTSP clients|UDP, TCP, RTSPS|AV1, VP9, VP8, H265, H264, MPEG-4 Video (H263, Xvid), MPEG-2 Video, M-JPEG and any RTP-compatible codec|Opus, MPEG-4 Audio (AAC), MPEG-2 Audio (MP3), G722, G711, LPCM and any RTP-compatible codec|
|RTSP servers and cameras|UDP, UDP-Multicast, TCP, RTSPS|AV1, VP9, VP8, H265, H264, MPEG-4 Video (H263, Xvid), MPEG-2 Video, M-JPEG and any RTP-compatible codec|Opus, MPEG-4 Audio (AAC), MPEG-2 Audio (MP3), G722, G711, LPCM and any RTP-compatible codec|
|RTMP clients (OBS Studio)|RTMP, RTMPS, Enhanced RTMP|AV1, H265, H264|MPEG-4 Audio (AAC), MPEG-2 Audio (MP3)|
|RTMP servers and cameras|RTMP, RTMPS, Enhanced RTMP|H264|MPEG-4 Audio (AAC), MPEG-2 Audio (MP3)|
|HLS servers and cameras|Low-Latency HLS, MP4-based HLS, legacy HLS|H265, H264|Opus, MPEG-4 Audio (AAC)|
|UDP/MPEG-TS streams|Unicast, broadcast, multicast|H265, H264|Opus, MPEG-4 Audio (AAC)|
|WebRTC|WHIP|AV1, VP9, VP8, H264|Opus, G722, G711|
|Raspberry Pi Cameras||H264||

And can be read from the server with:

|protocol|variants|video codecs|audio codecs|
|--------|--------|------------|------------|
|RTSP|UDP, UDP-Multicast, TCP, RTSPS|AV1, VP9, VP8, H265, H264, MPEG-4 Video (H263, Xvid), MPEG-2 Video, M-JPEG and any RTP-compatible codec|Opus, MPEG-4 Audio (AAC), MPEG-2 Audio (MP3), G722, G711, LPCM and any RTP-compatible codec|
|WebRTC|WHEP|AV1, VP9, VP8, H264|Opus, G722, G711|
|RTSP|UDP, UDP-Multicast, TCP, RTSPS|AV1, VP9, VP8, H265, H264, MPEG-4 Video (H263, Xvid), MPEG-2 Video, M-JPEG and any RTP-compatible codec|Opus, MPEG-4 Audio (AAC), MPEG-2 Audio (MP3), G722, G711, LPCM and any RTP-compatible codec|
|RTMP|RTMP, RTMPS, Enhanced RTMP|H264|MPEG-4 Audio (AAC), MPEG-2 Audio (MP3)|
|HLS|Low-Latency HLS, MP4-based HLS, legacy HLS|H265, H264|Opus, MPEG-4 Audio (AAC)|
|WebRTC|WHEP|AV1, VP9, VP8, H264|Opus, G722, G711|

Features:

Expand Down
165 changes: 153 additions & 12 deletions apidocs/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ components:
Path:
type: object
properties:
name:
type: string
confName:
type: string
conf:
Expand Down Expand Up @@ -355,6 +357,8 @@ components:
RTSPConn:
type: object
properties:
id:
type: string
created:
type: string
remoteAddr:
Expand All @@ -369,6 +373,8 @@ components:
RTSPSession:
type: object
properties:
id:
type: string
created:
type: string
remoteAddr:
Expand All @@ -386,6 +392,8 @@ components:
RTMPConn:
type: object
properties:
id:
type: string
created:
type: string
remoteAddr:
Expand All @@ -403,6 +411,8 @@ components:
HLSMuxer:
type: object
properties:
path:
type: string
created:
type: string
lastRequest:
Expand All @@ -414,46 +424,58 @@ components:
HLSMuxersList:
type: object
properties:
pageCount:
type: integer
items:
type: object
additionalProperties:
type: array
items:
$ref: '#/components/schemas/HLSMuxer'

PathsList:
type: object
properties:
pageCount:
type: integer
items:
type: object
additionalProperties:
type: array
items:
$ref: '#/components/schemas/Path'

RTMPConnsList:
type: object
properties:
pageCount:
type: integer
items:
type: object
additionalProperties:
type: array
items:
$ref: '#/components/schemas/RTMPConn'

RTSPConnsList:
type: object
properties:
pageCount:
type: integer
items:
type: object
additionalProperties:
type: array
items:
$ref: '#/components/schemas/RTSPConn'

RTSPSessionsList:
type: object
properties:
pageCount:
type: integer
items:
type: object
additionalProperties:
type: array
items:
$ref: '#/components/schemas/RTSPSession'

WebRTCConn:
type: object
properties:
id:
type: string
created:
type: string
remoteAddr:
Expand All @@ -477,9 +499,11 @@ components:
WebRTCConnsList:
type: object
properties:
pageCount:
type: integer
items:
type: object
additionalProperties:
type: array
items:
$ref: '#/components/schemas/WebRTCConn'

paths:
Expand Down Expand Up @@ -596,6 +620,19 @@ paths:
operationId: hlsMuxersList
summary: returns all HLS muxers.
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.
Expand All @@ -613,6 +650,19 @@ paths:
operationId: pathsList
summary: returns all paths.
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.
Expand All @@ -630,6 +680,19 @@ paths:
operationId: rtspConnsList
summary: returns all RTSP 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.
Expand All @@ -647,6 +710,19 @@ paths:
operationId: rtspSessionsList
summary: returns all RTSP sessions.
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.
Expand Down Expand Up @@ -684,6 +760,19 @@ paths:
operationId: rtspsConnsList
summary: returns all RTSPS 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.
Expand All @@ -701,6 +790,19 @@ paths:
operationId: rtspsSessionsList
summary: returns all RTSPS sessions.
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.
Expand Down Expand Up @@ -738,6 +840,19 @@ paths:
operationId: rtmpConnsList
summary: returns all RTMP 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.
Expand Down Expand Up @@ -775,6 +890,19 @@ paths:
operationId: rtmpsConnsList
summary: returns all RTMPS 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.
Expand Down Expand Up @@ -812,6 +940,19 @@ paths:
operationId: webrtcSessionsList
summary: returns all WebRTC 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.
Expand Down
Loading

0 comments on commit 9c79197

Please sign in to comment.