mirror of
https://github.com/fastogt/fastocloud_admin.git
synced 2025-03-09 23:38:52 +00:00
After some tests
This commit is contained in:
parent
a2d932de68
commit
e4b793a9d7
1 changed files with 22 additions and 14 deletions
|
@ -143,9 +143,21 @@ class IStream(EmbeddedDocument):
|
||||||
def to_front(self) -> dict:
|
def to_front(self) -> dict:
|
||||||
return {StreamFields.NAME: self.name, StreamFields.ID: self.get_id(), StreamFields.TYPE: self.get_type()}
|
return {StreamFields.NAME: self.name, StreamFields.ID: self.get_id(), StreamFields.TYPE: self.get_type()}
|
||||||
|
|
||||||
|
def config(self) -> dict:
|
||||||
|
conf = {
|
||||||
|
ID_FIELD: self.get_id(), # required
|
||||||
|
TYPE_FIELD: self.get_type(), # required
|
||||||
|
OUTPUT_FIELD: self.output.to_mongo() # required empty in timeshift_record
|
||||||
|
}
|
||||||
|
|
||||||
|
return conf
|
||||||
|
|
||||||
def fixup_output_urls(self):
|
def fixup_output_urls(self):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
def reset(self):
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
class ProxyStream(IStream):
|
class ProxyStream(IStream):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
@ -228,20 +240,16 @@ class HardwareStream(IStream):
|
||||||
return front
|
return front
|
||||||
|
|
||||||
def config(self) -> dict:
|
def config(self) -> dict:
|
||||||
conf = {
|
conf = super(HardwareStream, self).config()
|
||||||
ID_FIELD: self.get_id(), # required
|
conf[FEEDBACK_DIR_FIELD] = self.generate_feedback_dir()
|
||||||
TYPE_FIELD: self.get_type(), # required
|
conf[LOG_LEVEL_FIELD] = self.get_log_level()
|
||||||
FEEDBACK_DIR_FIELD: self.generate_feedback_dir(), # required
|
conf[AUTO_EXIT_TIME_FIELD] = self.get_auto_exit_time()
|
||||||
LOG_LEVEL_FIELD: self.get_log_level(),
|
conf[LOOP_FIELD] = self.get_loop()
|
||||||
AUTO_EXIT_TIME_FIELD: self.get_auto_exit_time(),
|
conf[AVFORMAT_FIELD] = self.get_avformat(),
|
||||||
LOOP_FIELD: self.get_loop(),
|
conf[HAVE_VIDEO_FIELD] = self.get_have_video(), # required
|
||||||
AVFORMAT_FIELD: self.get_avformat(),
|
conf[HAVE_AUDIO_FIELD] = self.get_have_audio(), # required
|
||||||
HAVE_VIDEO_FIELD: self.get_have_video(), # required
|
conf[RESTART_ATTEMPTS_FIELD] = self.get_restart_attempts(),
|
||||||
HAVE_AUDIO_FIELD: self.get_have_audio(), # required
|
conf[INPUT_FIELD] = self.input.to_mongo(), # required empty in timeshift_player
|
||||||
RESTART_ATTEMPTS_FIELD: self.get_restart_attempts(),
|
|
||||||
INPUT_FIELD: self.input.to_mongo(), # required empty in timeshift_player
|
|
||||||
OUTPUT_FIELD: self.output.to_mongo() # required empty in timeshift_record
|
|
||||||
}
|
|
||||||
|
|
||||||
audio_select = self.get_audio_select()
|
audio_select = self.get_audio_select()
|
||||||
if audio_select != constants.INVALID_AUDIO_SELECT:
|
if audio_select != constants.INVALID_AUDIO_SELECT:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue