Commit 82c7bf55 authored by d.basulto's avatar d.basulto

remove dummy files

parent 45cc682e
<?xml version="1.0" encoding="UTF-8"?>
<module classpath="CMake" type="CPP_MODULE" version="4" />
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/GStreamer_audioRecorder.iml" filepath="$PROJECT_DIR$/.idea/GStreamer_audioRecorder.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
This diff is collapsed.
CMakeLists.txt not found in /home/basultobd/Documentos/centroGEO/GStreamer_audioRecorder
f = open("HELLOWORLD.txt", "w")
f.write("hello world")
f.close()
\ No newline at end of file
#!/bin/sh
crontab -l >> ~/Documentos/centroGEO/GStreamer_audioRecorder/production/crontab.txt
# chmod +x ~/Documentos/centroGEO/GStreamer_audioRecorder/production/startRecord.sh
cd ~/Documentos/centroGEO/GStreamer_audioRecorder/production/
/usr/bin/python helloworld.py
\ No newline at end of file
#!/bin/bash
# Kill all the stream recorder processes
readarray -t array < streamsPIDS.txt
for e in "${array[@]}"
do
kill $e
done
\ No newline at end of file
APPNAME = streamManager
CC=g++ -std=c++11
CFLAGS=-c -g -Wall
all: Project
Project: main.o StreamManager.o
$(CC) -o $(APPNAME) main.o StreamManager.o -lpthread
StreamManager.o: StreamManager.cpp StreamManager.h
$(CC) $(CFLAGS) StreamManager.cpp -lpthread
main.o: main.cpp
$(CC) $(CFLAGS) main.cpp
import sys
import os
from json import load as jsonDec
# File config
startRecordPath = '$HOME/Documentos/centroGEO/GStreamer_audioRecorder/production/helloworld.sh'
startRecordFile = '$HOME/Documentos/centroGEO/GStreamer_audioRecorder/production/helloworld'
# Streams owners file
streamPublishersFile = 'streamPublishers.json'
# File that saves the recorders pid
PIDSFile = 'streamsPIDS.txt'
# Child
def startStream(publisher_url, record_time):
print('\nA new child ', os.getpid())
os.execl(startRecordPath, startRecordFile, publisher_url, record_time)
os._exit(0)
# Parent
def streamsInitializer(record_time):
with open(streamPublishersFile) as data:
publishers_data = jsonDec(data)
pids_file = open(PIDSFile, "w")
for i in range(len(publishers_data)):
new_pid = os.fork()
if(new_pid == 0):
startStream(publishers_data[i]["url"], str(record_time))
else:
pids = (os.getpid(), new_pid)
pids_file.write(str(new_pid) + "\n")
print("parent: %d, child: %d\n" % pids)
pids_file.close()
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
#!/bin/bash
mapfile -t myArray < file.txt
for (( i = 0 ; i < 2 ; i++))
do
echo "Element [$i]: ${myArray[$i]}"
./streamRecorder ${myArray[$i]} 60 &
done
\ No newline at end of file
[
{
"publisher" : "Radio formula", "url" : "http://streamingmovil.radioformula.com:8000/m1041"
},
{
"publisher" : "localhost", "url" : "http://streamingmovil.radioformula.com:8000/m1041"
}
]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment