Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

VideoStream.C File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "WKFUtils.h"
#include "Inform.h"
#include "VideoStream.h"
#include "vmdsock.h"
#include "VMDApp.h"
#include "DisplayDevice.h"
#include "TextEvent.h"

Go to the source code of this file.

Compounds

union  eventdataunion
struct  netint
 structure used to perform byte swapping operations. More...

struct  simenc_handle
struct  VSMsgHeader_t

Defines

#define VIDEOSTREAM_SIMENCODER   1
#define VS_PROTOCOL_VERSION   1
#define VS_HEADER_NUM_DATAUNION   6
#define VS_HEADERSIZE   sizeof(VSMsgHeader)

Typedefs

typedef VSMsgHeader_t VSMsgHeader

Functions

void * simenc_initialize (int width, int height, int Mbps, int tfps)
void simenc_destroy (void *voidhandle)
int simenc_reconfig (void *voidhandle, int width, int height, int bitrateMbps, int targetfps)
unsigned long simenc_encode_frame (void *voidhandle, const unsigned char *rgba, int pitch, int width, int height, unsigned char *&compbuf, long compbufsz, bool forceIframe)
unsigned long simenc_decode_frame (void *voidhandle, unsigned char *compbuf, long compbufsz, unsigned char *rgba, int width, int height)
void swap4 (char *data, int ndata)
int vs_htonl (int h)
int vs_ntohl (int n)
void fill_header (VSMsgHeader *header, int type, int length, int width=0, int height=0, int framecount=0)
void fill_header_uievent (VSMsgHeader *header, int type, int eventtype, int ival0, int ival1, int ival2)
void fill_header_uievent (VSMsgHeader *header, int type, int eventtype, float fval0)
void fill_header_uievent (VSMsgHeader *header, int type, int eventtype, float fval0, int ival1)
void fill_header_uievent (VSMsgHeader *header, int type, int eventtype, float fval0, float fval1, float fval2)
void swap_header (VSMsgHeader *header)


Define Documentation

#define VIDEOSTREAM_SIMENCODER   1
 

Definition at line 38 of file VideoStream.C.

#define VS_HEADER_NUM_DATAUNION   6
 

Definition at line 235 of file VideoStream.C.

Referenced by fill_header, fill_header_uievent, and swap_header.

#define VS_HEADERSIZE   sizeof(VSMsgHeader)
 

Definition at line 253 of file VideoStream.C.

Referenced by VideoStream::cli_send_keyboard, VideoStream::cli_send_rotate_by, VideoStream::cli_send_scale_by, VideoStream::cli_send_translate_by, VideoStream::srv_send_frame, and VideoStream::VideoStream.

#define VS_PROTOCOL_VERSION   1
 

Definition at line 234 of file VideoStream.C.


Typedef Documentation

typedef struct VSMsgHeader_t VSMsgHeader
 


Function Documentation

void fill_header VSMsgHeader   header,
int    type,
int    length,
int    width = 0,
int    height = 0,
int    framecount = 0
[static]
 

Definition at line 299 of file VideoStream.C.

References VSMsgHeader_t::eventdata, VSMsgHeader_t::eventtype, VSMsgHeader_t::framecount, VSMsgHeader_t::height, eventdataunion::ival, VSMsgHeader_t::len, length, VSMsgHeader_t::type, VS_HEADER_NUM_DATAUNION, vs_htonl, and VSMsgHeader_t::width.

Referenced by imd_disconnect, imd_go, imd_handshake, imd_kill, imd_pause, imd_send_energies, imd_send_fcoords, imd_send_mdcomm, imd_trate, and VideoStream::srv_send_frame.

void fill_header_uievent VSMsgHeader   header,
int    type,
int    eventtype,
float    fval0,
float    fval1,
float    fval2
[static]
 

Definition at line 405 of file VideoStream.C.

References VSMsgHeader_t::eventdata, VSMsgHeader_t::eventtype, VSMsgHeader_t::framecount, eventdataunion::fval, VSMsgHeader_t::height, eventdataunion::ival, VSMsgHeader_t::len, VSMsgHeader_t::type, VS_HEADER_NUM_DATAUNION, vs_htonl, and VSMsgHeader_t::width.

Referenced by VideoStream::cli_send_keyboard, VideoStream::cli_send_rotate_by, VideoStream::cli_send_scale_by, and VideoStream::cli_send_translate_by.

void fill_header_uievent VSMsgHeader   header,
int    type,
int    eventtype,
float    fval0,
int    ival1
[static]
 

Definition at line 384 of file VideoStream.C.

References VSMsgHeader_t::eventdata, VSMsgHeader_t::eventtype, VSMsgHeader_t::framecount, eventdataunion::fval, VSMsgHeader_t::height, eventdataunion::ival, VSMsgHeader_t::len, VSMsgHeader_t::type, VS_HEADER_NUM_DATAUNION, vs_htonl, and VSMsgHeader_t::width.

void fill_header_uievent VSMsgHeader   header,
int    type,
int    eventtype,
float    fval0
[static]
 

Definition at line 364 of file VideoStream.C.

References VSMsgHeader_t::eventdata, VSMsgHeader_t::eventtype, VSMsgHeader_t::framecount, eventdataunion::fval, VSMsgHeader_t::height, eventdataunion::ival, VSMsgHeader_t::len, VSMsgHeader_t::type, VS_HEADER_NUM_DATAUNION, vs_htonl, and VSMsgHeader_t::width.

void fill_header_uievent VSMsgHeader   header,
int    type,
int    eventtype,
int    ival0,
int    ival1,
int    ival2
[static]
 

Definition at line 347 of file VideoStream.C.

References VSMsgHeader_t::eventdata, VSMsgHeader_t::eventtype, VSMsgHeader_t::framecount, VSMsgHeader_t::height, eventdataunion::ival, VSMsgHeader_t::len, VSMsgHeader_t::type, VS_HEADER_NUM_DATAUNION, vs_htonl, and VSMsgHeader_t::width.

unsigned long simenc_decode_frame void *    voidhandle,
unsigned char *    compbuf,
long    compbufsz,
unsigned char *    rgba,
int    width,
int    height
[static]
 

Definition at line 84 of file VideoStream.C.

Referenced by VideoStream::check_event, and VideoStream::cli_decode_frame.

void simenc_destroy void *    voidhandle [static]
 

Definition at line 56 of file VideoStream.C.

Referenced by VideoStream::~VideoStream.

unsigned long simenc_encode_frame void *    voidhandle,
const unsigned char *    rgba,
int    pitch,
int    width,
int    height,
unsigned char *&    compbuf,
long    compbufsz,
bool    forceIframe
[static]
 

Definition at line 70 of file VideoStream.C.

Referenced by VideoStream::srv_send_frame.

void* simenc_initialize int    width,
int    height,
int    Mbps,
int    tfps
[static]
 

Definition at line 48 of file VideoStream.C.

References simenc_handle::height, and simenc_handle::width.

Referenced by VideoStream::VideoStream.

int simenc_reconfig void *    voidhandle,
int    width,
int    height,
int    bitrateMbps,
int    targetfps
[static]
 

Definition at line 61 of file VideoStream.C.

References simenc_handle::height, and simenc_handle::width.

void swap4 char *    data,
int    ndata
[static]
 

Definition at line 255 of file VideoStream.C.

References data.

void swap_header VSMsgHeader   header [static]
 

Definition at line 429 of file VideoStream.C.

References VSMsgHeader_t::eventdata, VSMsgHeader_t::eventtype, VSMsgHeader_t::framecount, VSMsgHeader_t::height, eventdataunion::ival, VSMsgHeader_t::len, VSMsgHeader_t::type, VS_HEADER_NUM_DATAUNION, vs_ntohl, and VSMsgHeader_t::width.

Referenced by imd_recv_header, and imd_recv_header_nolengthswap.

int vs_htonl int    h [static]
 

Definition at line 272 of file VideoStream.C.

References n.

Referenced by fill_header, and fill_header_uievent.

int vs_ntohl int    n [static]
 

Definition at line 291 of file VideoStream.C.

References netint::bytes, n, and netint::sint.

Referenced by swap_header.


Generated on Mon Dec 9 02:45:36 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002