![]() |
UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
|
#include "config.h"#include "config_unix.h"#include "config_win32.h"#include "host.h"#include "debug.h"#include "keyboard_control.h"#include "lib_common.h"#include "messaging.h"#include "module.h"#include "video_display.h"#include "tv.h"#include "audio/types.h"#include "audio/utils.h"#include "utils/ring_buffer.h"#include "video.h"#include <math.h>#include <SDL/SDL.h>#include <SDL/SDL_syswm.h>#include <condition_variable>#include <mutex>#include <queue>
Go to the source code of this file.
Classes | |
| struct | state_sdl |
Macros | |
| #define | FOURCC_UYVY 0x59565955 |
| #define | FOURCC_YUYV 0x32595559 |
| #define | MAGIC_SDL 0x155734ae |
| #define | MAX_BUFFER_SIZE 1 |
| #define | SDL_USER_NEWFRAME SDL_USEREVENT |
Functions | |
| static void | cleanup_screen (struct state_sdl *s) |
| static void | compute_dst_rect (struct state_sdl *s, int vid_w, int vid_h, int window_w, int window_h, codec_t codec) |
| static void | configure_audio (struct state_sdl *s) |
| static void | display_frame (struct state_sdl *s, struct video_frame *frame) |
| static void | display_sdl_done (void *state) |
| static bool | display_sdl_get_property (void *state, int property, void *val, size_t *len) |
| static struct video_frame * | display_sdl_getf (void *state) |
| static void * | display_sdl_init (struct module *parent, const char *fmt, unsigned int flags) |
| static void | display_sdl_probe (struct device_info **available_cards, int *count, void(**deleter)(void *)) |
| static void | display_sdl_put_audio_frame (void *state, const struct audio_frame *frame) |
| static bool | display_sdl_putf (void *state, struct video_frame *frame, long long nonblock) |
| static bool | display_sdl_reconfigure (void *state, struct video_desc desc) |
| static bool | display_sdl_reconfigure_audio (void *state, int quant_samples, int channels, int sample_rate) |
| static bool | display_sdl_reconfigure_real (void *state, struct video_desc desc) |
| static void | display_sdl_run (void *arg) |
| static void | loadSplashscreen (struct state_sdl *s) |
| REGISTER_MODULE (sdl, &display_sdl_info, LIBRARY_CLASS_VIDEO_DISPLAY, VIDEO_DISPLAY_ABI_VERSION) | |
| static void | sdl_audio_callback (void *userdata, Uint8 *stream, int len) |
| static void | show_help (void) |
| static bool | update_size (struct state_sdl *s, int win_w, int win_h) |
Variables | |
| static const struct video_display_info | display_sdl_info |
Definition in file sdl.cpp.
| #define FOURCC_UYVY 0x59565955 |
Definition at line 74 of file sdl.cpp.
Referenced by display_sdl_reconfigure_real().
| #define FOURCC_YUYV 0x32595559 |
Definition at line 75 of file sdl.cpp.
Referenced by display_sdl_reconfigure_real().
| #define MAGIC_SDL 0x155734ae |
Definition at line 73 of file sdl.cpp.
Referenced by display_sdl_done(), display_sdl_getf(), and display_sdl_putf().
| #define MAX_BUFFER_SIZE 1 |
Definition at line 77 of file sdl.cpp.
Referenced by display_sdl_putf().
| #define SDL_USER_NEWFRAME SDL_USEREVENT |
Definition at line 81 of file sdl.cpp.
Referenced by display_sdl_putf(), and display_sdl_run().
|
static |
Definition at line 381 of file sdl.cpp.
References codec_is_a_rgb(), video_desc::color_spec, state_sdl::current_display_desc, state_sdl::sdl_screen, and state_sdl::yuv_image.
Referenced by display_sdl_done().

|
static |
Definition at line 158 of file sdl.cpp.
References codec_is_a_rgb(), and state_sdl::dst_rect.
Referenced by display_sdl_reconfigure_real(), and update_size().

|
static |
Definition at line 664 of file sdl.cpp.
References state_sdl::audio_buffer, state_sdl::audio_frame, audio_frame::data, FALSE, state_sdl::play_audio, and ring_buffer_init().
Referenced by display_sdl_init().

|
static |
Definition at line 219 of file sdl.cpp.
References codec_is_a_rgb(), video_frame::color_spec, state_sdl::current_display_desc, tile::data, tile::data_len, state_sdl::deinterlace, display_sdl_reconfigure_real(), state_sdl::dst_rect, frame, state_sdl::frames, state_sdl::free_frame_queue, get_bpp(), get_decoder_from_to(), tile::height, state_sdl::lock, LOG_LEVEL_INFO, log_msg(), RGB, RGBA, state_sdl::sdl_screen, video_frame::tiles, state_sdl::tv, tv_diff(), vc_deinterlace(), vc_get_linesize(), video_desc_eq(), video_desc_from_frame(), tile::width, and state_sdl::yuv_image.
Referenced by display_put_frame(), and display_sdl_run().

|
static |
Definition at line 559 of file sdl.cpp.
References cleanup_screen(), state_sdl::free_frame_queue, state_sdl::magic, MAGIC_SDL, state, and vf_free().

|
static |
Definition at line 634 of file sdl.cpp.
References codecs, DISPLAY_PROPERTY_CODECS, len, property, RGB, RGBA, state, UNUSED, UYVY, val, and YUYV.
|
static |
Definition at line 585 of file sdl.cpp.
References state_sdl::current_desc, state_sdl::free_frame_queue, state_sdl::lock, state_sdl::magic, MAGIC_SDL, state, vf_alloc_desc_data(), vf_free(), video_desc_eq(), and video_desc_from_frame().

|
static |
Definition at line 450 of file sdl.cpp.
References state_sdl::state_sdl(), video_desc::color_spec, configure_audio(), state_sdl::deinterlace, desc, DISPLAY_FLAG_AUDIO_ANY, DISPLAY_FLAG_AUDIO_EMBEDDED, display_sdl_reconfigure_real(), FALSE, state_sdl::fixed_h, state_sdl::fixed_size, state_sdl::fixed_w, flags, fmt, video_desc::fps, state_sdl::fs, get_module(), get_root_module(), video_desc::height, INIT_NOERR, video_desc::interlacing, keycontrol_register_key(), loadSplashscreen(), LOG_LEVEL_ERROR, log_msg(), state_sdl::nodecorate, parent, state_sdl::play_audio, PROGRESSIVE, RGBA, state_sdl::screen_h, state_sdl::screen_w, show_help(), video_desc::tile_count, TRUE, video_desc::width, and x11_set_display().

|
static |
Definition at line 768 of file sdl.cpp.
References count, deleter, device_info::dev, name, and UNUSED.
|
static |
Definition at line 751 of file sdl.cpp.
References state_sdl::audio_buffer, change_bps(), frame, state_sdl::play_audio, ring_buffer_write(), and state.

|
static |
Definition at line 605 of file sdl.cpp.
References state_sdl::buffered_frames_count, frame, state_sdl::frame_consumed_cv, state_sdl::lock, state_sdl::magic, MAGIC_SDL, MAX_BUFFER_SIZE, nonblock, PUTF_BLOCKING, PUTF_DISCARD, SDL_USER_NEWFRAME, state, and vf_free().
Referenced by loadSplashscreen().

|
static |
Definition at line 395 of file sdl.cpp.
References state_sdl::current_desc, desc, and state.
Referenced by loadSplashscreen().
|
static |
Definition at line 679 of file sdl.cpp.
References state_sdl::audio_frame, audio_frame::bps, audio_frame::ch_count, channels, audio_frame::data, FALSE, audio_frame::max_size, state_sdl::play_audio, quant_samples, audio_frame::sample_rate, sample_rate, sdl_audio_callback(), and state.

|
static |
Definition at line 403 of file sdl.cpp.
References codec_is_a_rgb(), video_desc::color_spec, compute_dst_rect(), state_sdl::current_display_desc, desc, state_sdl::fixed_size, FOURCC_UYVY, FOURCC_YUYV, get_commandline_param(), video_desc::height, state_sdl::nodecorate, state_sdl::sdl_flags_fs, state_sdl::sdl_flags_win, state_sdl::sdl_screen, state, update_size(), UYVY, video_desc::width, and state_sdl::yuv_image.
Referenced by display_frame(), and display_sdl_init().

|
static |
Definition at line 302 of file sdl.cpp.
References state_sdl::buffered_frames_count, check_message(), state_sdl::current_display_desc, state_sdl::deinterlace, display_frame(), exit_uv(), FALSE, state_sdl::frame_consumed_cv, free_message(), state_sdl::fs, video_desc::height, state_sdl::lock, LOG_LEVEL_DEBUG, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, log_msg(), state_sdl::mod, msg, new_response(), RESPONSE_BAD_REQUEST, RESPONSE_OK, SDL_USER_NEWFRAME, TRUE, update_size(), and video_desc::width.

|
static |
Definition at line 152 of file sdl.cpp.
References display_sdl_putf(), display_sdl_reconfigure(), frame, get_splashscreen(), PUTF_BLOCKING, and video_desc_from_frame().
Referenced by display_sdl_init().

| REGISTER_MODULE | ( | sdl | , |
| & | display_sdl_info, | ||
| LIBRARY_CLASS_VIDEO_DISPLAY | , | ||
| VIDEO_DISPLAY_ABI_VERSION | ) |
|
static |
Definition at line 655 of file sdl.cpp.
References state_sdl::audio_buffer, len, ring_buffer_read(), and usleep().
Referenced by display_sdl_reconfigure_audio().

|
static |
Definition at line 370 of file sdl.cpp.
Referenced by display_sdl_init().
|
static |
Definition at line 194 of file sdl.cpp.
References video_desc::color_spec, compute_dst_rect(), state_sdl::current_display_desc, state_sdl::fs, video_desc::height, state_sdl::screen_h, state_sdl::screen_w, state_sdl::sdl_flags_fs, state_sdl::sdl_flags_win, state_sdl::sdl_screen, and video_desc::width.
Referenced by display_sdl_reconfigure_real(), and display_sdl_run().

|
static |
Definition at line 777 of file sdl.cpp.