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

VideoStream Class Reference

#include <VideoStream.h>

Inheritance diagram for VideoStream:

UIObject List of all members.

Public Types

enum  VSEventDev {
  VS_EV_NONE, VS_EV_ROTATE_BY, VS_EV_TRANSLATE_BY, VS_EV_SCALE_BY,
  VS_EV_KEYBOARD
}

Public Methods

 VideoStream (VMDApp *)
 ~VideoStream (void)
int cli_listen (int port)
int cli_connect (const char *hostname, int port)
int cli_wait_msg ()
int cli_disconnect ()
const char * cli_gethost ()
int cli_getport ()
int cli_connected ()
int cli_decode_frame (unsigned char *cbuf, long cbufsz, unsigned char *rgba, int width, int height)
int cli_send_rotate_by (float angle, char axis)
int cli_send_translate_by (float dx, float dy, float dz)
int cli_send_scale_by (float scalefactor)
int cli_send_keyboard (int dev, char val, int shift_state)
int srv_listen (int port)
int srv_connect (const char *hostname, int port)
int srv_send_frame (const unsigned char *rgba, int pitch, int width, int height, int forceIFrame)
int srv_disconnect ()
const char * srv_gethost ()
int srv_getport ()
int srv_connected ()
int set_target_bitrate_Mbps (float Mbps)
int set_target_frame_rate (float tfps)
int check_event ()
 check for an event, and queue it if found. Return TRUE if an event was generated. More...

int act_on_command (int, Command *)
 update the display due to a command being executed. Return whether any action was taken on this command. Arguments are the command type, command object, and the success of the command (T or F). More...

void video_frame_pending (const unsigned char *ptr=NULL, int pwidth=0, int pheight=0)
void video_frame_force_Iframe ()
int srv_check_ui_event ()
 return last UI event type we received, VS_EV_NONE if none was recvd. More...

int srv_process_all_events ()
 return last UI event type we received, VS_EV_NONE if none was recvd. More...

int srv_get_last_event_type (int &eventtype)
 return last rotation event info. More...

int srv_get_last_rotate_by (float &angle, int &axis)
 return last translation event info. More...

int srv_get_last_translate_by (float &tx, float &ty, float &tz)
 return last scaling event info. More...

int srv_get_last_scale_by (float &factor)
 return last keyboard event info. More...

int srv_get_last_keyboard (int &dev, int &val, int &shift_state)

Member Enumeration Documentation

enum VideoStream::VSEventDev
 

Enumeration values:
VS_EV_NONE  no event occured; never sent.
VS_EV_ROTATE_BY  rotation on cartesian axis by angle.
VS_EV_TRANSLATE_BY  3DoF translation.
VS_EV_SCALE_BY  uniform scaling operation.
VS_EV_KEYBOARD  key down event.

Definition at line 93 of file VideoStream.h.


Constructor & Destructor Documentation

VideoStream::VideoStream VMDApp  
 

Definition at line 450 of file VideoStream.C.

References UIObject::app, VMDApp::display, NULL, DisplayDevice::resize_window, simenc_initialize, VS_HEADERSIZE, wkf_timer_create, wkf_timer_start, wkf_timer_timenow, DisplayDevice::xSize, and DisplayDevice::ySize.

VideoStream::~VideoStream void   
 

Definition at line 517 of file VideoStream.C.

References NULL, simenc_destroy, and wkf_timer_destroy.


Member Function Documentation

int VideoStream::act_on_command int    type,
Command   cmd
[virtual]
 

update the display due to a command being executed. Return whether any action was taken on this command. Arguments are the command type, command object, and the success of the command (T or F).

Reimplemented from UIObject.

Definition at line 1345 of file VideoStream.C.

int VideoStream::check_event void    [virtual]
 

check for an event, and queue it if found. Return TRUE if an event was generated.

Reimplemented from UIObject.

Definition at line 974 of file VideoStream.C.

References UIObject::app, VMDApp::background_processing_set, VMDApp::display, DisplayDevice::drawpixels_rgba4u, DisplayDevice::EventCodes, VSMsgHeader_t::eventdata, VSMsgHeader_t::eventtype, eventdataunion::fval, VSMsgHeader_t::height, eventdataunion::ival, VSMsgHeader_t::len, NULL, DisplayDevice::prepare3D, DisplayDevice::readpixels_rgba4u, DisplayDevice::resize_window, UIObject::runcommand, VMDApp::scene_rotate_by, VMDApp::scene_scale_by, VMDApp::scene_translate_by, simenc_decode_frame, srv_send_frame, vmdsock_destroy, vmdsock_selread, VS_EV_KEYBOARD, VS_EV_ROTATE_BY, VS_EV_SCALE_BY, VS_EV_TRANSLATE_BY, VSMsgHeader_t::width, wkf_timer_timenow, DisplayDevice::xSize, and DisplayDevice::ySize.

Referenced by srv_check_ui_event, OpenGLPbufferDisplayDevice::update, and OpenGLDisplayDevice::update.

int VideoStream::cli_connect const char *    hostname,
int    port
 

Definition at line 571 of file VideoStream.C.

References NULL, vmdsock_connect, vmdsock_create, vmdsock_destroy, vmdsock_init, and wkf_timer_timenow.

Referenced by text_cmd_videostream, and VMDApp::vs_connect.

int VideoStream::cli_connected   [inline]
 

Definition at line 47 of file VideoStream.h.

References NULL.

Referenced by Mouse::check_event, VMDApp::scene_rotate_by, VMDApp::scene_scale_by, VMDApp::scene_translate_by, text_cmd_videostream, and VMDApp::VMDupdate.

int VideoStream::cli_decode_frame unsigned char *    cbuf,
long    cbufsz,
unsigned char *    rgba,
int    width,
int    height
 

Definition at line 909 of file VideoStream.C.

References simenc_decode_frame.

int VideoStream::cli_disconnect  
 

Definition at line 604 of file VideoStream.C.

References NULL, and vmdsock_destroy.

Referenced by text_cmd_videostream, and VMDApp::vs_disconnect.

const char* VideoStream::cli_gethost   [inline]
 

Definition at line 45 of file VideoStream.h.

Referenced by text_cmd_videostream.

int VideoStream::cli_getport   [inline]
 

Definition at line 46 of file VideoStream.h.

Referenced by text_cmd_videostream.

int VideoStream::cli_listen int    port
 

Definition at line 547 of file VideoStream.C.

References NULL, vmdsock_accept, vmdsock_bind, vmdsock_create, vmdsock_destroy, vmdsock_init, vmdsock_listen, and vmdsock_selread.

Referenced by text_cmd_videostream.

int VideoStream::cli_send_keyboard int    dev,
char    val,
int    shift_state
 

Definition at line 951 of file VideoStream.C.

References fill_header_uievent, VS_EV_KEYBOARD, and VS_HEADERSIZE.

int VideoStream::cli_send_rotate_by float    angle,
char    axis
 

Definition at line 921 of file VideoStream.C.

References fill_header_uievent, VS_EV_ROTATE_BY, and VS_HEADERSIZE.

Referenced by VMDApp::scene_rotate_by.

int VideoStream::cli_send_scale_by float    scalefactor
 

Definition at line 941 of file VideoStream.C.

References fill_header_uievent, VS_EV_SCALE_BY, and VS_HEADERSIZE.

Referenced by VMDApp::scene_scale_by.

int VideoStream::cli_send_translate_by float    dx,
float    dy,
float    dz
 

Definition at line 931 of file VideoStream.C.

References fill_header_uievent, VS_EV_TRANSLATE_BY, and VS_HEADERSIZE.

Referenced by VMDApp::scene_translate_by.

int VideoStream::cli_wait_msg  
 

Definition at line 600 of file VideoStream.C.

int VideoStream::set_target_bitrate_Mbps float    Mbps [inline]
 

Definition at line 66 of file VideoStream.h.

Referenced by text_cmd_videostream.

int VideoStream::set_target_frame_rate float    tfps [inline]
 

Definition at line 72 of file VideoStream.h.

Referenced by text_cmd_videostream.

int VideoStream::srv_check_ui_event  
 

return last UI event type we received, VS_EV_NONE if none was recvd.

Definition at line 962 of file VideoStream.C.

References check_event, and VS_EV_NONE.

Referenced by OptiXRenderer::render_to_videostream.

int VideoStream::srv_connect const char *    hostname,
int    port
 

Definition at line 654 of file VideoStream.C.

References NULL, vmdsock_connect, vmdsock_create, vmdsock_destroy, vmdsock_init, and wkf_timer_timenow.

Referenced by text_cmd_videostream.

int VideoStream::srv_connected   [inline]
 

Definition at line 64 of file VideoStream.h.

References NULL.

Referenced by OptiXRenderer::render_to_videostream, text_cmd_videostream, OpenGLPbufferDisplayDevice::update, OpenGLDisplayDevice::update, VMDApp::VMDupdate, and OptiXDisplayDevice::write_trailer.

int VideoStream::srv_disconnect  
 

Definition at line 753 of file VideoStream.C.

References NULL, and vmdsock_destroy.

Referenced by text_cmd_videostream.

int VideoStream::srv_get_last_event_type int &    eventtype [inline]
 

return last rotation event info.

Definition at line 111 of file VideoStream.h.

Referenced by OptiXRenderer::render_to_videostream.

int VideoStream::srv_get_last_keyboard int &    dev,
int &    val,
int &    shift_state
[inline]
 

Definition at line 144 of file VideoStream.h.

References VS_EV_NONE.

Referenced by OptiXRenderer::render_to_videostream.

int VideoStream::srv_get_last_rotate_by float &    angle,
int &    axis
[inline]
 

return last translation event info.

Definition at line 117 of file VideoStream.h.

References VS_EV_NONE.

Referenced by OptiXRenderer::render_to_videostream.

int VideoStream::srv_get_last_scale_by float &    factor [inline]
 

return last keyboard event info.

Definition at line 136 of file VideoStream.h.

References VS_EV_NONE.

Referenced by OptiXRenderer::render_to_videostream.

int VideoStream::srv_get_last_translate_by float &    tx,
float &    ty,
float &    tz
[inline]
 

return last scaling event info.

Definition at line 126 of file VideoStream.h.

References VS_EV_NONE.

Referenced by OptiXRenderer::render_to_videostream.

const char* VideoStream::srv_gethost   [inline]
 

Definition at line 62 of file VideoStream.h.

Referenced by text_cmd_videostream.

int VideoStream::srv_getport   [inline]
 

Definition at line 63 of file VideoStream.h.

Referenced by text_cmd_videostream.

int VideoStream::srv_listen int    port
 

Definition at line 630 of file VideoStream.C.

References NULL, vmdsock_accept, vmdsock_bind, vmdsock_create, vmdsock_destroy, vmdsock_init, vmdsock_listen, and vmdsock_selread.

Referenced by text_cmd_videostream.

int VideoStream::srv_process_all_events   [inline]
 

return last UI event type we received, VS_EV_NONE if none was recvd.

Definition at line 105 of file VideoStream.h.

int VideoStream::srv_send_frame const unsigned char *    rgba,
int    pitch,
int    width,
int    height,
int    forceIFrame
 

Definition at line 681 of file VideoStream.C.

References fill_header, simenc_encode_frame, vmd_msleep, VS_HEADERSIZE, and wkf_timer_timenow.

Referenced by check_event, and VMDApp::VMDupdate.

void VideoStream::video_frame_force_Iframe   [inline]
 

Definition at line 91 of file VideoStream.h.

void VideoStream::video_frame_pending const unsigned char *    ptr = NULL,
int    pwidth = 0,
int    pheight = 0
[inline]
 

Definition at line 84 of file VideoStream.h.

References NULL.

Referenced by OpenGLPbufferDisplayDevice::update, OpenGLDisplayDevice::update, and VMDApp::VMDupdate.


The documentation for this class was generated from the following files:
Generated on Fri Nov 8 02:47:25 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002