![]() |
UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
|

Topics | |
| Audio | |
Files | |
| file | video_display.c |
| file | video_display.h |
Classes | |
| struct | multi_sources_supp_info |
| struct | video_display_info |
Macros | |
| #define | DISPLAY_NO_GENERIC_FPS_INDICATOR ((const char *) 0x00) |
| #define | PUTF_BLOCKING LLONG_MAX |
| #define | PUTF_DISCARD (-1LL) |
| #define | PUTF_NONBLOCK 0LL |
| #define | VIDEO_DISPLAY_ABI_VERSION 21 |
Functions | |
| bool | display_ctl_property (struct display *d, int property, void *val, size_t *len) |
| Get/set property (similar to ioctl) | |
| void | display_done (struct display *d) |
| This function performs cleanup after done. | |
| struct video_frame * | display_get_frame (struct display *d) |
| Returns video framebuffer which will be written to. | |
| void | display_join (struct display *d) |
| bool | display_needs_mainloop (struct display *d) |
| bool | display_put_frame (struct display *d, struct video_frame *frame, long long timeout_ns) |
| } | |
| bool | display_reconfigure (struct display *d, struct video_desc desc, enum video_mode mode) |
| void | display_run_mainloop (struct display *d) |
| Display mainloop function. | |
| void | display_run_new_thread (struct display *d) |
| const char * | get_audio_conn_flag_name (int audio_init_flag) |
| struct video_frame * | get_splashscreen (void) |
| int | initialize_video_display (struct module *parent, const char *requested_display, const char *fmt, unsigned int flags, const char *postprocess, struct display **out) |
| Initializes video display. | |
| void | list_video_display_devices (bool full) |
Display Properties | |
| enum | display_property { DISPLAY_PROPERTY_CODECS = 0 , DISPLAY_PROPERTY_RGB_SHIFT = 1 , DISPLAY_PROPERTY_BUF_PITCH = 2 , DISPLAY_PROPERTY_VIDEO_MODE = 3 , DISPLAY_PROPERTY_SUPPORTED_IL_MODES = 4 , DISPLAY_PROPERTY_SUPPORTS_MULTI_SOURCES = 5 , DISPLAY_PROPERTY_AUDIO_FORMAT = 6 } |
| enum | display_prop_vid_mode { DISPLAY_PROPERTY_VIDEO_MERGED = 0 , DISPLAY_PROPERTY_VIDEO_SEPARATE_TILES = 1 , DISPLAY_PROPERTY_VIDEO_SEPARATE_3D = 2 } |
| #define | PITCH_DEFAULT -1 |
| default pitch, i. e. respective linesize | |
Initialization Flags | |
| #define | DISPLAY_FLAG_AUDIO_EMBEDDED (1<<1) |
| #define | DISPLAY_FLAG_AUDIO_AESEBU (1<<2) |
| #define | DISPLAY_FLAG_AUDIO_ANALOG (1<<3) |
| #define | DISPLAY_FLAG_AUDIO_ANY (DISPLAY_FLAG_AUDIO_EMBEDDED | DISPLAY_FLAG_AUDIO_AESEBU | DISPLAY_FLAG_AUDIO_ANALOG) |
API for video display . Normal operation is something like: Thread #1 (main thread)
If display needs parallel processing, it can use run() function which will be started in main thread. It must return control when receiving NULL frame (poisoned pill).
| #define DISPLAY_FLAG_AUDIO_AESEBU (1<<2) |
Definition at line 110 of file video_display.h.
Referenced by audio_playback_get_display_flags(), display_aggregate_init(), get_audio_conn_flag_name(), and set_audio_props().
| #define DISPLAY_FLAG_AUDIO_ANALOG (1<<3) |
Definition at line 111 of file video_display.h.
Referenced by audio_playback_get_display_flags(), display_aggregate_init(), get_audio_conn_flag_name(), and set_audio_props().
| #define DISPLAY_FLAG_AUDIO_ANY (DISPLAY_FLAG_AUDIO_EMBEDDED | DISPLAY_FLAG_AUDIO_AESEBU | DISPLAY_FLAG_AUDIO_ANALOG) |
Definition at line 113 of file video_display.h.
Referenced by display_aja_init(), display_decklink_init(), display_file_init(), display_sdl2_init(), and display_sdl_init().
| #define DISPLAY_FLAG_AUDIO_EMBEDDED (1<<1) |
Definition at line 109 of file video_display.h.
Referenced by audio_playback_get_display_flags(), display_aggregate_init(), display_deltacast_init(), display_dvs_init(), display_sdl_init(), get_audio_conn_flag_name(), and set_audio_props().
| #define DISPLAY_NO_GENERIC_FPS_INDICATOR ((const char *) 0x00) |
Definition at line 151 of file video_display.h.
Referenced by display_caca_info_get().
| #define PITCH_DEFAULT -1 |
default pitch, i. e. respective linesize
Definition at line 140 of file video_display.h.
Referenced by display_bluefish444_get_property(), display_ctl_property(), display_decklink_get_property(), display_deltacast_get_property(), display_dvs_get_property(), display_gl_get_property(), display_ndi_get_property(), display_panogl_get_property(), display_pipe_get_property(), display_reconfigure(), display_sage_get_property(), display_sdl2_get_property(), display_unix_sock_get_property(), display_xrgl_get_property(), and reconfigure_decoder().
| #define PUTF_BLOCKING LLONG_MAX |
Definition at line 191 of file video_display.h.
Referenced by decompress_thread(), display_blend_putf(), display_blend_run(), display_caca_done(), display_conference_putf(), display_conference_worker(), display_dvs_putf(), display_gl_putf(), display_multiplier_putf(), display_multiplier_worker(), display_panogl_putf(), display_sdl2_putf(), display_sdl_putf(), display_unix_sock_putf(), display_xrgl_putf(), loadSplashscreen(), ihdtv_video_rxtx::receiver_loop(), loopback_video_rxtx::receiver_loop(), ultragrid_rtp_video_rxtx::receiver_loop(), and worker().
| #define PUTF_DISCARD (-1LL) |
@ancor putf_flags {
Definition at line 189 of file video_display.h.
Referenced by display_blend_putf(), display_caca_putf(), display_conference_putf(), display_drm_putf(), display_dummy_putf(), display_dump_putf(), display_file_putf(), display_gl_putf(), display_multiplier_putf(), display_ndi_putf(), display_panogl_putf(), display_pipe_putf(), display_put_frame(), display_pw_putf(), display_sdl2_putf(), display_sdl_putf(), display_unix_sock_putf(), display_xrgl_putf(), ultragrid::aja::display::Putf(), reconfigure_decoder(), and video_decoder_remove_display().
| #define PUTF_NONBLOCK 0LL |
Definition at line 190 of file video_display.h.
Referenced by sage_video_rxtx::~sage_video_rxtx(), decompress_thread(), display_gl_putf(), display_gl_render_last(), and sage_video_rxtx::send_frame().
| #define VIDEO_DISPLAY_ABI_VERSION 21 |
Definition at line 149 of file video_display.h.
Referenced by initialize_video_display(), and list_video_display_devices().
Definition at line 142 of file video_display.h.
| enum display_property |
| Enumerator | |
|---|---|
| DISPLAY_PROPERTY_CODECS | list of natively supported codecs - codec_t[] |
| DISPLAY_PROPERTY_RGB_SHIFT | red,green,blue shift - int[3] (bits) |
| DISPLAY_PROPERTY_BUF_PITCH | requested framebuffer pitch - int (bytes), may be PITCH_DEFAULT |
| DISPLAY_PROPERTY_VIDEO_MODE | requested video mode - int (one of display_prop_vid_mode) |
| DISPLAY_PROPERTY_SUPPORTED_IL_MODES | display supported interlacing modes - enum interlacing_t[] |
| DISPLAY_PROPERTY_SUPPORTS_MULTI_SOURCES | whether display supports receiving data from - returns (struct multi_sources_supp_info *) multiple network sources concurrently |
| DISPLAY_PROPERTY_AUDIO_FORMAT |
|
Definition at line 128 of file video_display.h.
| bool display_ctl_property | ( | struct display * | d, |
| int | property, | ||
| void * | val, | ||
| size_t * | len ) |
Get/set property (similar to ioctl)
Get/set property (similar to ioctl)
| [in] | d | video display state |
| [in] | property | one of display_property |
| [in] | val | pointer to output buffer where should be the property stored |
| [in] | len | provided buffer length |
| [out] | len | actual size written |
Definition at line 515 of file video_display.c.
References video_display_info::ctl_property, DISPLAY_MAGIC, DISPLAY_PROPERTY_BUF_PITCH, DISPLAY_PROPERTY_CODECS, funcs, len, LOG_LEVEL_ERROR, log_msg(), magic, PITCH_DEFAULT, postprocess, property, restrict_returned_codecs(), state, val, VIDEO_CODEC_COUNT, vo_postprocess_get_property(), and VO_PP_PROPERTY_CODECS.
Referenced by display_aggregate_get_property(), display_blend_get_property(), display_conference_get_property(), display_multiplier_get_property(), main(), ultragrid_rtp_video_rxtx::receiver_loop(), reconfigure_decoder(), vidcap_ug_input_init(), video_decoder_register_display(), and worker().

| void display_done | ( | struct display * | d | ) |
This function performs cleanup after done.
| d | display do be destroyed (must not be NULL) |
Definition at line 184 of file video_display.c.
References DISPLAY_MAGIC, display_name, video_display_info::done, funcs, magic, mod, module_done(), postprocess, state, and vo_postprocess_done().
Referenced by sage_video_rxtx::~sage_video_rxtx(), state_blend_common::~state_blend_common(), ultragrid_rtp_video_rxtx::~ultragrid_rtp_video_rxtx(), display_aggregate_done(), display_aggregate_init(), done(), hd_rum_decompress_done(), initialize_video_display(), main(), test_video_display(), and vidcap_ug_input_done().

| struct video_frame * display_get_frame | ( | struct display * | d | ) |
Returns video framebuffer which will be written to.
Currently there is a restriction on number of concurrently acquired frames - only one frame can be hold at the moment. Every obtained frame from this call has to be returned back with display_put_frame()
Definition at line 321 of file video_display.c.
References check_message(), DISPLAY_MAGIC, free_message(), funcs, video_display_info::getf, magic, mod, msg, postprocess, process_message(), state, and vo_postprocess_getf().
Referenced by decompress_thread(), display_aggregate_getf(), display_blend_run(), display_conference_worker(), display_multiplier_worker(), ihdtv_video_rxtx::receiver_loop(), loopback_video_rxtx::receiver_loop(), reconfigure_decoder(), sage_video_rxtx::send_frame(), and worker().

| void display_join | ( | struct display * | d | ) |
Joins the display task if run in a separate thread (
The function blocks while the display runs. The display can be terminated by passing a poisoned pill (frame == NULL) using the display_put_frame() call.
Definition at line 273 of file video_display.c.
References CHECK, DISPLAY_MAGIC, magic, thread_id, and thread_started.
Referenced by sage_video_rxtx::~sage_video_rxtx(), display_aggregate_run(), display_blend_run(), display_multiplier_run(), done(), hd_rum_decompress_done(), and vidcap_ug_input_done().
| bool display_needs_mainloop | ( | struct display * | d | ) |
Returns true if display has a run routine that needs to be run in a main thread
Definition at line 197 of file video_display.c.
References DISPLAY_MAGIC, funcs, magic, and video_display_info::run.
Referenced by display_multiplier_init(), and display_run_new_thread().
| bool display_put_frame | ( | struct display * | d, |
| struct video_frame * | frame, | ||
| long long | timeout_ns ) |
}
}
| d | display to be putted frame to |
| frame | frame that has been obtained from display_get_frame() and has not yet been put. Should not be NULL unless we want to quit display mainloop. |
| timeout_ns | specifies timeout that should be waited ( |
| true | if displayed succesfully (or discarded if flag=PUTF_DISCARD) |
| false | if not displayed when flag=PUTF_NONBLOCK and it would block |
Definition at line 372 of file video_display.c.
References display_frame(), display_frame_helper(), DISPLAY_MAGIC, display_pitch, frame, funcs, video_display_info::getf, magic, postprocess, pp_output_frames_count, video_display_info::putf, PUTF_DISCARD, state, and vo_postprocess().
Referenced by sage_video_rxtx::~sage_video_rxtx(), decompress_thread(), display_aggregate_putf(), display_blend_run(), display_conference_worker(), display_multiplier_worker(), hd_rum_decompress_done(), ihdtv_video_rxtx::receiver_loop(), loopback_video_rxtx::receiver_loop(), ultragrid_rtp_video_rxtx::receiver_loop(), reconfigure_decoder(), sage_video_rxtx::send_frame(), vidcap_ug_input_done(), video_decoder_remove_display(), and worker().

| bool display_reconfigure | ( | struct display * | d, |
| struct video_desc | desc, | ||
| enum video_mode | mode ) |
| void display_run_mainloop | ( | struct display * | d | ) |
Display mainloop function.
It is intended for GUI displays (GL/SDL), which run main event loop and need to be run from main thread of the program (macOS).
The display can be terminated by passing a poisoned pill (frame == NULL) using the display_put_frame() call.
| d | display to be run |
Definition at line 232 of file video_display.c.
References DISPLAY_MAGIC, funcs, magic, mainloop, mainloop_udata, video_display_info::run, and state.
Referenced by display_conference_run(), display_multiplier_run(), and main().
| void display_run_new_thread | ( | struct display * | d | ) |
This function runs the display in a new thread and does not block.
It should not be used for GUI displays (GL/SDL), which usually need to be run from main thread of the * program (OS X).
Displays started with this functions need to be waited on (
| d | display to be run |
Definition at line 253 of file video_display.c.
References CHECK, DISPLAY_MAGIC, display_needs_mainloop(), display_run_helper(), funcs, LOG_LEVEL_WARNING, log_msg(), magic, video_display_info::run, thread_id, and thread_started.
Referenced by sage_video_rxtx::sage_video_rxtx(), display_aggregate_run(), display_blend_init(), display_multiplier_run(), hd_rum_decompress_init(), init(), and vidcap_ug_input_init().

| const char * get_audio_conn_flag_name | ( | int | audio_init_flag | ) |
Definition at line 636 of file video_display.c.
References DISPLAY_FLAG_AUDIO_AESEBU, DISPLAY_FLAG_AUDIO_ANALOG, DISPLAY_FLAG_AUDIO_EMBEDDED, and UG_ASSERT.
Referenced by set_audio_props().
| struct video_frame * get_splashscreen | ( | void | ) |
Definition at line 604 of file video_display.c.
References video_desc::color_spec, video_frame::color_spec, tile::data, tile::data_len, desc, video_desc::fps, frame, HEADER_PIXEL, tile::height, video_desc::height, video_desc::interlacing, PROGRESSIVE, RGBA, splash_data, splash_height, splash_width, video_desc::tile_count, video_frame::tiles, vc_get_linesize(), vf_alloc_desc_data(), tile::width, and video_desc::width.
Referenced by display_caca_init(), display_gl_init_opengl(), get_splash_fb(), gl_load_splashscreen(), loadSplashscreen(), and loadSplashscreen().

| int initialize_video_display | ( | struct module * | parent, |
| const char * | requested_display, | ||
| const char * | fmt, | ||
| unsigned int | flags, | ||
| const char * | postprocess, | ||
| struct display ** | out ) |
Initializes video display.
| [in] | requested_display | video display module name, not NULL |
| [in] | fmt | command-line entered format string, not NULL |
| [in] | flags | bit sum of display_flags |
| [in] | postprocess | configuration for display postprocess, is NULL if no present |
| [out] | out | output display state. Defined only if initialization was successful. |
| 0 | if sucessful |
| -1 | if failed |
| 1 | if successfully shown help (no state returned) |
Definition at line 124 of file video_display.c.
References module::cls, debug_msg, display_done(), DISPLAY_MAGIC, display_name, flags, fmt, funcs, get_time_in_ns(), video_display_info::init, INIT_NOERR, LIBRARY_CLASS_VIDEO_DISPLAY, load_library(), LOG_LEVEL_ERROR, log_msg(), magic, mod, MODULE_CLASS_DISPLAY, module_done(), module_init_default(), module_register(), parent, postprocess, show_vo_postprocess_help(), state, t0, VIDEO_DISPLAY_ABI_VERSION, and vo_postprocess_init().
Referenced by sage_video_rxtx::sage_video_rxtx(), display_aggregate_init(), display_blend_fork(), display_blend_init(), display_conference_fork(), display_conference_init(), display_multiplier_init(), hd_rum_decompress_init(), init(), main(), test_video_display(), and vidcap_ug_input_init().

| void list_video_display_devices | ( | bool | full | ) |
Definition at line 100 of file video_display.c.
References LIBRARY_CLASS_VIDEO_DISPLAY, list_modules(), and VIDEO_DISPLAY_ABI_VERSION.
Referenced by parse_options_internal(), and test_video_display().
