i want to create another thread in vlc 1.0.2 which contains a socket listening on a port for some encoder parameters used by vlc during the encoding, with the aim of change them at runtime, without kill the encoder process..
I'm compiling on WinXP using MINGW http://wiki.videolan.org/Win32CompileMSYSNew
I can successfully compile the source code, but know i've added the code for the new socket (it's not ended but just for test)
Code: Select all
#include <sys/types.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/uio.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <pthread.h>
...
...
static int StartSocket( )
{
struct sockaddr_in server,client;
char buffer[50];
int socket = socket (AF_INET, SOCK_STREAM, 0);
server.sin_family = AF_INET;
server.sin_addr.s_addr = INADDR_ANY;
server.sin_port = htons(SERVER_PORT);
bind(socket, (struct sockaddr *)&server, sizeof(server));
listen(socket, 1);
while(1)
{
int req=accept(sock, (struct sockaddr *)&client, &client_len);
int lenght=recv(req, buffer, 50, 0);
}
}
Should i use a predefined types for vlc instead the one i've done? I've seen that in other files of source code the included file which are missing, seems to be correctly found....
Thanks for your help!
brizio