#ifndef _SHARED_H_ #define _SHARED_H_ #include #include "yuv_frame.h" #ifdef WIN32 #include #define pthread_mutex_t CRITICAL_SECTION #define pthread_t DWORD #define pthread_mutex_lock(param) EnterCriticalSection(param) #define pthread_mutex_unlock(param) LeaveCriticalSection(param) #else #include #endif using namespace std; struct ServerInfo { char *serverIP; int serverPort; ServerInfo(char *IP, int port) : serverIP(IP), serverPort(port) {} }; struct BufferInfo { char *recvbuffer; int *bytesrecv; int *recvptr; vector *framevec; vector *indexvec; int id; pthread_mutex_t *mutex, *vmutex; BufferInfo(char *rb, int *br, int *rp, pthread_mutex_t *m, pthread_mutex_t *vm, vector *fv, vector *iv, int id) : recvbuffer(rb), bytesrecv(br), recvptr(rp), mutex(m), vmutex(vm), framevec(fv), indexvec(iv), id(id) {} }; #endif