Renamed all binaries with DDV_ prefix, updated Buffer for new systems, updated RAW connector, partly updated RTMP connector - ready for recode. All connectors now have host binding options.
This commit is contained in:
parent
cc78697ba2
commit
2b22834fd8
11 changed files with 295 additions and 263 deletions
|
@ -1,6 +1,6 @@
|
|||
SRC = main.cpp ../sockets/sw_base.cpp ../sockets/sw_inet.cpp ../sockets/sw_unix.cpp
|
||||
SRC = main.cpp ../util/ddv_socket.cpp
|
||||
OBJ = $(SRC:.cpp=.o)
|
||||
OUT = Connector_RAW
|
||||
OUT = DDV_Conn_RAW
|
||||
INCLUDES =
|
||||
CCFLAGS = -Wall -Wextra -funsigned-char -g
|
||||
CC = $(CROSS)g++
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <iostream>
|
||||
#include "../sockets/SocketW.h"
|
||||
#include "../util/ddv_socket.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cstdlib>
|
||||
|
@ -7,19 +7,24 @@
|
|||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
int main() {
|
||||
SWUnixSocket mySocket;
|
||||
std::string input;
|
||||
std::cin >> input;
|
||||
input = "/tmp/shared_socket_"+input;
|
||||
mySocket.connect(input);
|
||||
char buffer[500000];
|
||||
int msg;
|
||||
while(std::cout.good()) {
|
||||
msg = mySocket.recv(&buffer[0],10000);
|
||||
std::cout.write(buffer,msg);
|
||||
int main(int argc, char ** argv) {
|
||||
if (argc < 2){
|
||||
std::cout << "Usage: " << argv[0] << " stream_name" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
// disconnect
|
||||
mySocket.disconnect();
|
||||
std::string input;
|
||||
input = "/tmp/shared_socket_";
|
||||
input += argv[1];
|
||||
DDV::Socket S(input);
|
||||
if (!S.connected()){
|
||||
std::cout << "Could not open stream " << argv[1] << std::endl;
|
||||
return 1;
|
||||
}
|
||||
char buffer[50000];
|
||||
int msg;
|
||||
while(std::cout.good() && S.read(buffer,50000)){
|
||||
std::cout.write(buffer,50000);
|
||||
}
|
||||
S.close();
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue