UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
state_gl Struct Reference
Collaboration diagram for state_gl:
Collaboration graph

Classes

struct  current_display_desc
 

Public Types

enum class  deint { off , on , force }
 
enum  modeset_t { MODESET = -2 , MODESET_SIZE_ONLY = GLFW_DONT_CARE , NOMODESET = 0 }
 
enum  show_cursor_t { SC_TRUE , SC_FALSE , SC_AUTOHIDE }
 

Public Member Functions

 state_gl (struct module *parent)
 
 ~state_gl ()
 

Static Public Member Functions

static const char * deint_to_string (state_gl::deint val)
 

Public Attributes

double aspect = 0.0
 
struct video_desc current_desc = {}
 
struct video_frame * current_frame = nullptr
 
GLuint current_program = 0
 
steady_clock::time_point cursor_shown_from {}
 indicates time point from which is cursor show if show_cursor == SC_AUTOHIDE, timepoint() means cursor is not currently shown
 
enum state_gl::deint deinterlace = deint::off
 
int dxt_height = 0
 
GLuint fbo_id = 0
 
int fixed_h = 0
 
bool fixed_size = false
 
int fixed_w = 0
 
condition_variable frame_consumed_cv
 
queue< struct video_frame * > frame_queue
 
queue< struct video_frame * > free_frame_queue
 
bool fs = false
 
double gamma = 0.0
 
map< int, int > init_hints
 
mutex lock
 
uint32_t magic = MAGIC_GL
 
struct module mod
 
enum state_gl::modeset_t modeset = NOMODESET
 positive vals force framerate
 
GLFWmonitor * monitor = nullptr
 
condition_variable new_frame_ready_cv
 
bool noresizable = false
 
volatile bool paused = false
 
GLuint pbo_id = 0
 
GLuint PHandle_deint = 0
 
unordered_map< codec_t, GLuint > PHandles
 
int pos_x = INT_MIN
 
int pos_y = INT_MIN
 
int req_monitor_idx = -1
 
vector< char > scratchpad
 scratchpad sized WxHx8
 
enum state_gl::show_cursor_t show_cursor = SC_AUTOHIDE
 
void * syphon_spout = nullptr
 
string syphon_spout_srv_name
 
GLuint texture_display = 0
 
GLuint texture_raw = 0
 
int use_pbo = -1
 
bool vdp_interop = false
 
double video_aspect = 0.0
 
int vsync = 1
 
GLFWwindow * window = nullptr
 
map< int, int > window_hints
 
double window_size_factor = 1.0
 

Detailed Description

Definition at line 371 of file gl.cpp.

Member Enumeration Documentation

◆ deint

enum class state_gl::deint
strong
Enumerator
off 
on 
force 

Definition at line 389 of file gl.cpp.

◆ modeset_t

Enumerator
MODESET 
MODESET_SIZE_ONLY 
NOMODESET 

Definition at line 426 of file gl.cpp.

426{ MODESET = -2, MODESET_SIZE_ONLY = GLFW_DONT_CARE, NOMODESET = 0 } modeset = NOMODESET;
enum state_gl::modeset_t modeset
positive vals force framerate
@ NOMODESET
Definition gl.cpp:426
@ MODESET
Definition gl.cpp:426
@ MODESET_SIZE_ONLY
Definition gl.cpp:426

◆ show_cursor_t

Enumerator
SC_TRUE 
SC_FALSE 
SC_AUTOHIDE 

Definition at line 410 of file gl.cpp.

@ SC_FALSE
Definition gl.cpp:410
@ SC_AUTOHIDE
Definition gl.cpp:410
@ SC_TRUE
Definition gl.cpp:410
enum state_gl::show_cursor_t show_cursor

Constructor & Destructor Documentation

◆ state_gl()

state_gl::state_gl ( struct module * parent)
inline

Definition at line 439 of file gl.cpp.

439 {
443 }
void module_init_default(struct module *module_data)
Definition module.c:48
void module_register(struct module *module_data, struct module *parent)
Definition module.c:82
@ MODULE_CLASS_DATA
Definition module.h:86
const char * parent
Definition settings.cpp:198
enum module_class cls
Definition module.h:115
struct module mod
Definition gl.cpp:416

References module::cls, mod, MODULE_CLASS_DATA, module_init_default(), module_register(), and parent.

Referenced by display_gl_init().

Here is the call graph for this function:

◆ ~state_gl()

state_gl::~state_gl ( )
inline

Definition at line 445 of file gl.cpp.

445 {
447
449 }
void module_done(struct module *module_data)
Definition module.c:93
int glfw_init_count
0->1 - call glfwInit, 1->0 call glfwTerminate; glfw{Init,Terminate} should be called from main thr,...
Definition host.cpp:182

References glfw_init_count, mod, and module_done().

Here is the call graph for this function:

Member Function Documentation

◆ deint_to_string()

static const char * state_gl::deint_to_string ( state_gl::deint val)
inlinestatic

Definition at line 451 of file gl.cpp.

451 {
452 switch (val) {
453 case state_gl::deint::off: return "OFF";
454 case state_gl::deint::on: return "ON";
455 case state_gl::deint::force: return "FORCE";
456 }
457 return NULL;
458 }
int void * val

References force, off, on, and val.

Referenced by display_gl_init(), and display_gl_process_key().

Member Data Documentation

◆ aspect

double state_gl::aspect = 0.0

◆ current_desc

struct video_desc state_gl::current_desc = {}

Definition at line 395 of file gl.cpp.

395{};

Referenced by display_gl_getf(), and display_gl_reconfigure().

◆ current_frame

struct video_frame* state_gl::current_frame = nullptr

Definition at line 391 of file gl.cpp.

Referenced by display_gl_done(), display_gl_process_key(), and gl_process_frames().

◆ current_program

GLuint state_gl::current_program = 0

Definition at line 374 of file gl.cpp.

Referenced by gl_reconfigure_screen(), gl_render(), and gl_render_glsl().

◆ cursor_shown_from

steady_clock::time_point state_gl::cursor_shown_from {}

indicates time point from which is cursor show if show_cursor == SC_AUTOHIDE, timepoint() means cursor is not currently shown

Definition at line 411 of file gl.cpp.

411{};

Referenced by gl_process_frames().

◆ deinterlace

◆ dxt_height

int state_gl::dxt_height = 0

Definition at line 405 of file gl.cpp.

Referenced by gl_process_frames(), gl_reconfigure_screen(), and upload_compressed_texture().

◆ fbo_id

GLuint state_gl::fbo_id = 0

Definition at line 377 of file gl.cpp.

Referenced by display_gl_cleanup_opengl(), display_gl_init_opengl(), and gl_render_glsl().

◆ fixed_h

int state_gl::fixed_h = 0

Definition at line 422 of file gl.cpp.

Referenced by display_gl_init_opengl(), and set_size().

◆ fixed_size

bool state_gl::fixed_size = false

◆ fixed_w

int state_gl::fixed_w = 0

Definition at line 421 of file gl.cpp.

Referenced by display_gl_init_opengl(), and set_size().

◆ frame_consumed_cv

condition_variable state_gl::frame_consumed_cv

Definition at line 399 of file gl.cpp.

Referenced by display_gl_putf(), and pop_frame().

◆ frame_queue

queue<struct video_frame *> state_gl::frame_queue

◆ free_frame_queue

queue<struct video_frame *> state_gl::free_frame_queue

Definition at line 394 of file gl.cpp.

Referenced by display_gl_done(), display_gl_getf(), display_gl_putf(), and gl_process_frames().

◆ fs

◆ gamma

double state_gl::gamma = 0.0

Definition at line 403 of file gl.cpp.

Referenced by display_gl_parse_fmt(), and set_gamma().

◆ init_hints

map<int, int> state_gl::init_hints

Definition at line 427 of file gl.cpp.

Referenced by display_gl_init(), and parse_hints().

◆ lock

mutex state_gl::lock

Definition at line 397 of file gl.cpp.

Referenced by display_gl_getf(), display_gl_putf(), and gl_process_frames().

◆ magic

uint32_t state_gl::magic = MAGIC_GL

Definition at line 383 of file gl.cpp.

Referenced by display_gl_done(), display_gl_getf(), display_gl_putf(), and gl_reconfigure_screen().

◆ mod

struct module state_gl::mod

Definition at line 416 of file gl.cpp.

Referenced by state_gl(), ~state_gl(), display_gl_init(), and gl_process_frames().

◆ modeset

◆ monitor

GLFWmonitor* state_gl::monitor = nullptr

◆ new_frame_ready_cv

condition_variable state_gl::new_frame_ready_cv

Definition at line 398 of file gl.cpp.

Referenced by display_gl_putf(), and gl_process_frames().

◆ noresizable

bool state_gl::noresizable = false

◆ paused

volatile bool state_gl::paused = false

Definition at line 409 of file gl.cpp.

Referenced by display_gl_process_key(), display_gl_putf(), and gl_process_frames().

◆ pbo_id

GLuint state_gl::pbo_id = 0

◆ PHandle_deint

GLuint state_gl::PHandle_deint = 0

Definition at line 373 of file gl.cpp.

Referenced by display_gl_init_opengl(), gl_process_frames(), and gl_reconfigure_screen().

◆ PHandles

unordered_map<codec_t, GLuint> state_gl::PHandles

◆ pos_x

int state_gl::pos_x = INT_MIN

Definition at line 423 of file gl.cpp.

Referenced by display_gl_init_opengl(), and set_size().

◆ pos_y

int state_gl::pos_y = INT_MIN

Definition at line 424 of file gl.cpp.

Referenced by display_gl_init_opengl(), and set_size().

◆ req_monitor_idx

int state_gl::req_monitor_idx = -1

Definition at line 432 of file gl.cpp.

Referenced by display_gl_init_opengl(), and display_gl_parse_fmt().

◆ scratchpad

vector<char> state_gl::scratchpad

scratchpad sized WxHx8

Definition at line 437 of file gl.cpp.

Referenced by gl_reconfigure_screen(), and upload_texture().

◆ show_cursor

◆ syphon_spout

void* state_gl::syphon_spout = nullptr

Definition at line 418 of file gl.cpp.

Referenced by display_gl_cleanup_opengl(), gl_process_frames(), and gl_reconfigure_screen().

◆ syphon_spout_srv_name

string state_gl::syphon_spout_srv_name

Definition at line 412 of file gl.cpp.

Referenced by display_gl_parse_fmt(), and gl_reconfigure_screen().

◆ texture_display

GLuint state_gl::texture_display = 0

◆ texture_raw

GLuint state_gl::texture_raw = 0

◆ use_pbo

int state_gl::use_pbo = -1

Definition at line 431 of file gl.cpp.

Referenced by display_gl_init(), display_gl_parse_fmt(), and upload_texture().

◆ vdp_interop

bool state_gl::vdp_interop = false

Definition at line 436 of file gl.cpp.

Referenced by display_gl_init_opengl().

◆ video_aspect

double state_gl::video_aspect = 0.0

Definition at line 402 of file gl.cpp.

Referenced by display_gl_parse_fmt(), and gl_reconfigure_screen().

◆ vsync

int state_gl::vsync = 1

◆ window

◆ window_hints

map<int, int> state_gl::window_hints
Initial value:
= {
{GLFW_AUTO_ICONIFY, GLFW_FALSE}
}

Definition at line 428 of file gl.cpp.

428 {
429 {GLFW_AUTO_ICONIFY, GLFW_FALSE}
430 };

Referenced by display_gl_parse_fmt(), display_gl_set_window_hints(), and parse_hints().

◆ window_size_factor

double state_gl::window_size_factor = 1.0

The documentation for this struct was generated from the following file: