2 # pragma warning (disable: 4251) // STL MAP DLL warning noise (JW)
5 #include "VideoTransmitter.hh"
12 port_ = D_CS_DEFAULT_PORT;
34 cout <<
"Initializing VideoTransmitter on port:"<<
port_<<endl;
36 #ifdef BIAS_HAVE_LIBJPEG
39 BIASERR(
"Could not initialize JPEG-compression!!!");
43 #else //BIAS_HAVE_LIBJPEG
45 BIASERR(
"Compression mode not available without LIBJPEG!");
47 #endif //BIAS_HAVE_LIBJPEG
62 BIASERR(
"VideoTransmitter not initialized");
74 #ifdef BIAS_HAVE_LIBJPEG
102 #else //BIAS_HAVE_LIBJPEG
103 BIASERR(
"LIBJPEG not configured --> no compression available !!!");
105 #endif //BIAS_HAVE_LIBJPEG
110 stringstream dataToSend;
112 msgSize_= dataToSend.str().length();
void GetCompressedData(void *&data, long &length)
Get pointer to memory where to find compressed data and its length in byte.
int GetConnections()
returns the number of connected commPartners
void WaitForConnections(unsigned int port=D_CS_DEFAULT_PORT)
Init function, returns instantly and enables the server to accept connections on the given port ...
int Compress(BIAS::Image< unsigned char > &srcImg, int quality=60)
Start compression for given BIAS::Image into buffer.
int Init(int port=D_CS_DEFAULT_PORT)
color values, 3 channels, order: red,green,blue
void SetKeepAll(bool on)
If not threaded you can set this true to keep all received data.
std::string targetAddress_
enum EColorModel GetColorModel() const
int Init(long size=10485760)
Initialize object with standard values and limit shared memory area to given size (in byte...
int Process(BIAS::Image< unsigned char > &image)
int SendMsg(const std::string &msgName, std::vector< float > &floatData)
sends msg msgName to all connected commPartners.
static int ToRGB(const Image< StorageType > &source, Image< StorageType > &dest)
Create a RGB converted copy of source image in this.
static int ToGrey(const ImageBase &source, ImageBase &dest)
wrapper for the templated function ToGrey