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',
|
2023-06-21 17:55:27 +00:00
|
|
|
'inter',
|
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
|