Restructuring + installer scripts

This commit is contained in:
Thulinma 2010-10-20 03:23:28 +02:00
parent 006da11595
commit ce6843044c
11 changed files with 34 additions and 9 deletions

6
.gitignore vendored
View file

@ -1,9 +1,9 @@
#ignore object files and nonsense like that #ignore object files and nonsense like that
*.[oa] *.[oa]
Admin/main Admin/main
Client/Client_PLS Connector_HTTP/Connector_HTTP
Server/Server_PLS Buffer/Buffer
Connector_RTMP/Connector_RTMP Connector_RTMP/Connector_RTMP
Connector_RTSP/Connector_RTSP Connector_RTSP/Connector_RTSP
*~ *~
bin/*

View file

@ -1,6 +1,6 @@
SRC = main.cpp ../sockets/sw_base.cpp ../sockets/sw_inet.cpp ../sockets/sw_unix.cpp SRC = main.cpp ../sockets/sw_base.cpp ../sockets/sw_inet.cpp ../sockets/sw_unix.cpp
OBJ = $(SRC:.cpp=.o) OBJ = $(SRC:.cpp=.o)
OUT = Server_PLS OUT = Buffer
INCLUDES = INCLUDES =
CCFLAGS = -Wall -Wextra -funsigned-char -g CCFLAGS = -Wall -Wextra -funsigned-char -g
CC = $(CROSS)g++ CC = $(CROSS)g++

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash
ffmpeg -re -i "$1" -b 1024000 -ar 11025 -f flv - 2> /dev/null | ./Server_PLS 500 ffmpeg -re -i "$1" -b 1024000 -ar 11025 -f flv - 2> /dev/null | ./Buffer 500

View file

@ -3,7 +3,7 @@
#ffmpeg -y -i "$1" -ar 44100 -vcodec libx264 -b 1000k -g 150 -r 20 -f flv - | ./Server_PLS 500 #ffmpeg -y -i "$1" -ar 44100 -vcodec libx264 -b 1000k -g 150 -r 20 -f flv - | ./Buffer 500
ffmpeg -i "$1" -re -acodec aac -ar 11025 -vcodec libx264 -b 700k -vpre ultrafast -refs 1 -bf 0 -g 150 -f flv - 2> /dev/null | ./Server_PLS 500 ffmpeg -i "$1" -re -acodec aac -ar 11025 -vcodec libx264 -b 700k -vpre ultrafast -refs 1 -bf 0 -g 150 -f flv - 2> /dev/null | ./Buffer 500

View file

@ -1,6 +1,6 @@
SRC = main.cpp ../sockets/sw_base.cpp ../sockets/sw_inet.cpp ../sockets/sw_unix.cpp SRC = main.cpp ../sockets/sw_base.cpp ../sockets/sw_inet.cpp ../sockets/sw_unix.cpp
OBJ = $(SRC:.cpp=.o) OBJ = $(SRC:.cpp=.o)
OUT = Client_PLS OUT = Connector_HTTP
INCLUDES = INCLUDES =
CCFLAGS = -Wall -Wextra -funsigned-char -g CCFLAGS = -Wall -Wextra -funsigned-char -g
CC = $(CROSS)g++ CC = $(CROSS)g++

View file

@ -186,7 +186,7 @@ void parseChunk(){
for (std::string::iterator i=streamname.end()-1; i>=streamname.begin(); --i){ for (std::string::iterator i=streamname.end()-1; i>=streamname.begin(); --i){
if (!isalpha(*i) && !isdigit(*i)){streamname.erase(i);}else{*i=tolower(*i);} if (!isalpha(*i) && !isdigit(*i)){streamname.erase(i);}else{*i=tolower(*i);}
} }
streamname = "/tmp/" + streamname; streamname = "/tmp/shared_socket_" + streamname;
SendUSR(0, 1);//send UCM StreamBegin (0), stream 1 SendUSR(0, 1);//send UCM StreamBegin (0), stream 1
//send a status reply //send a status reply
AMFType amfreply("container", (unsigned char)0xFF); AMFType amfreply("container", (unsigned char)0xFF);

25
Makefile Normal file
View file

@ -0,0 +1,25 @@
default: client-local-install
client:
cd Connector_HTTP; $(MAKE)
cd Connector_RTMP; $(MAKE)
cd Connector_RTSP; $(MAKE)
cd Buffer; $(MAKE)
client-clean:
cd Connector_HTTP; $(MAKE) clean
cd Connector_RTMP; $(MAKE) clean
cd Connector_RTSP; $(MAKE) clean
cd Buffer; $(MAKE) clean
clean: client-clean
client-install: client
cp -f ./Connector_HTTP/Connector_HTTP /usr/bin/
cp -f ./Connector_RTMP/Connector_RTMP /usr/bin/
cp -f ./Connector_RTSP/Connector_RTSP /usr/bin/
cp -f ./Buffer/Buffer /usr/bin/
client-local-install: client
mkdir -p ./bin
cp -f ./Connector_HTTP/Connector_HTTP ./bin/
cp -f ./Connector_RTMP/Connector_RTMP ./bin/
cp -f ./Connector_RTSP/Connector_RTSP ./bin/
cp -f ./Buffer/Buffer ./bin/