Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GStreamer_audioRecorder
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
m3
GStreamer_audioRecorder
Commits
dfdc510a
Commit
dfdc510a
authored
Oct 19, 2017
by
d.basulto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename
parent
7dd0db9f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
40 deletions
+0
-40
manager.py
manager.py
+0
-40
No files found.
manager.py
deleted
100644 → 0
View file @
7dd0db9f
import
sys
import
os
from
json
import
load
as
jsonDec
# File config
executeAppCommand
=
'./record.sh'
appName
=
'record'
# Streams owners file
streamPublishersFile
=
'streamPublishers.json'
# Child
def
startStream
(
publisher_name
,
publisher_url
,
record_time
):
os
.
execl
(
executeAppCommand
,
appName
,
publisher_name
,
publisher_url
,
record_time
)
os
.
_exit
(
0
)
# Parent
def
streamsInitializer
(
record_time
):
with
open
(
streamPublishersFile
)
as
data
:
publishers_data
=
jsonDec
(
data
)
for
i
in
range
(
len
(
publishers_data
)):
new_pid
=
os
.
fork
()
if
(
new_pid
==
0
):
startStream
(
publishers_data
[
i
][
"publisher"
],
publishers_data
[
i
][
"url"
],
record_time
)
else
:
pids
=
(
os
.
getpid
(),
new_pid
)
print
(
"parent:
%
d, child:
%
d
\n
"
%
pids
)
def
main
():
if
(
len
(
sys
.
argv
)
<
2
):
print
(
"Record time required - eg. python startRecorders.py 60"
)
else
:
record_time
=
sys
.
argv
[
1
]
streamsInitializer
(
record_time
)
if
__name__
==
'__main__'
:
main
()
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment