2020-11-27 12:27:05 +00:00
|
|
|
import os
|
|
|
|
|
2022-10-23 09:13:23 +00:00
|
|
|
DIRS = [
|
|
|
|
'audio',
|
|
|
|
'generic',
|
|
|
|
'mux',
|
|
|
|
'net',
|
|
|
|
'text',
|
|
|
|
'utils',
|
|
|
|
'video',
|
|
|
|
]
|
|
|
|
|
2020-11-27 12:27:05 +00:00
|
|
|
# Plugins whose name is prefixed by 'rs'
|
2022-10-23 09:13:23 +00:00
|
|
|
RS_PREFIXED = [
|
|
|
|
'audiofx',
|
|
|
|
'closedcaption',
|
|
|
|
'file',
|
|
|
|
'onvif',
|
|
|
|
'webp',
|
|
|
|
'videofx',
|
|
|
|
'webrtc',
|
|
|
|
'png',
|
|
|
|
'tracers',
|
|
|
|
'rtp',
|
2024-01-10 10:10:19 +00:00
|
|
|
'rtsp',
|
2023-06-21 17:55:27 +00:00
|
|
|
'inter',
|
2024-10-22 14:53:35 +00:00
|
|
|
'relationmeta',
|
2022-10-23 09:13:23 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
OVERRIDE = {
|
|
|
|
'ahead': 'textahead',
|
|
|
|
'flavors': 'rsflv',
|
|
|
|
'wrap': 'textwrap',
|
|
|
|
}
|
2020-11-27 12:27:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
def iterate_plugins():
|
|
|
|
for d in DIRS:
|
|
|
|
for name in os.listdir(d):
|
|
|
|
if name in RS_PREFIXED:
|
|
|
|
name = "rs{}".format(name)
|
|
|
|
else:
|
|
|
|
name = OVERRIDE.get(name, name)
|
|
|
|
yield name
|