#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/types.h>
#include <libdv/dv_types.h>
#include <pthread.h>
#include "xdvshow-sdl.h"
#include "xdvshow-shm.h"
#include "xdvshow-flags.h"
#include "xdvshow-defs.h"
#include <postprocess.h>
Include dependency graph for xdvshow-sdl.c:
Go to the source code of this file.
Defines | |
#define | DV_FOURCC_YUY2 0x32595559 |
#define | DV_FOURCC_IYUV 0x56555949 |
Functions | |
int | Get_resolution () |
Internal helper function getting a display resolution. | |
void | yuy2yuv (uint8_t **src, uint8_t **dst) |
converts colorspaces between YUY2 and IYUV (I420). | |
void _dv_center_window | __P ((SDL_Surface *)) |
int | xdvshow_SDL_handle_events (void) |
SDL Event handler. | |
int | xdvshow_open_window (char *window_name, struct x_params *param) |
This function creates a new window with SDL screen inside. | |
int | xdvshow_close_window (void) |
closes the sdl window. | |
int | xdvshow_render (void) |
Function that renders the video. | |
void | _dv_center_window (SDL_Surface *screen) |
Just an internal function that centers the SDL window within whole display. | |
Variables | |
SDL_Surface * | sdl_screen |
SDL_Overlay * | overlay |
SDL_Overlay * | dstoverlay |
SDL_Rect | rect |
SDL_Event | sdl_event |
Display * | display |
int | width |
int | height |
unsigned int | res_x = 800 res_y = 600 |
pp_context_t * | pp_context |
pp_mode_t * | pp_mode |
|
Referenced by xdvshow_open_window(). |
|
Referenced by xdvshow_open_window(). |
|
|
|
Just an internal function that centers the SDL window within whole display.
Definition at line 435 of file xdvshow-sdl.c. Referenced by xdvshow_open_window().
|
|
Internal helper function getting a display resolution.
Definition at line 84 of file xdvshow-sdl.c. References display, flags_stereo, and res_x. Referenced by xdvshow_open_window().
|
|
closes the sdl window. There is also some cleanup after postprocessing (if required).
Definition at line 374 of file xdvshow-sdl.c. References DPRINT, flags_deinterlace, pp_context, and pp_mode. Referenced by sigint_signal().
|
|
This function creates a new window with SDL screen inside.
Definition at line 209 of file xdvshow-sdl.c. References _dv_center_window(), x_params::decode_format, display, DPRINT, dstoverlay, x_params::dv_format_type, DV_FOURCC_IYUV, DV_FOURCC_YUY2, flags_deinterlace, flags_fullscreen, flags_scale, flags_sdlnooverlay, flags_stereo, flags_zoom, Get_resolution(), height, overlay, x_params::pitches, x_params::pixels, pp_context, pp_mode, rect, res_x, sdl_screen, and width. Referenced by video_thread_func().
Here is the call graph for this function: ![]() |
|
Function that renders the video. If there is any postprocessing required, the function converts the frame to IYUV and then calls pp_postprocess from libpostproc.
Definition at line 399 of file xdvshow-sdl.c. References display, dstoverlay, flags_deinterlace, overlay, pp_context, pp_mode, rect, and yuy2yuv(). Referenced by video_thread_func().
Here is the call graph for this function: ![]() |
|
SDL Event handler. Function looks for any pending events (eg. key was pressed) and then handles it. Actually there is only a quit event implemented.
Definition at line 179 of file xdvshow-sdl.c. References _xdvshow_shm, __xdvshow_shm::parent_pid, and sdl_event. Referenced by video_thread_func().
|
|
converts colorspaces between YUY2 and IYUV (I420).
Definition at line 113 of file xdvshow-sdl.c. References overlay. Referenced by xdvshow_render().
|
|
Definition at line 68 of file xdvshow-sdl.c. Referenced by Get_resolution(), xdvshow_open_window(), and xdvshow_render(). |
|
Definition at line 62 of file xdvshow-sdl.c. Referenced by xdvshow_open_window(), and xdvshow_render(). |
|
Definition at line 71 of file xdvshow-sdl.c. Referenced by xdvshow_open_window(), xdvshow_x11_open_window(), and xdvshow_x11_render(). |
|
Definition at line 61 of file xdvshow-sdl.c. Referenced by xdvshow_open_window(), xdvshow_render(), and yuy2yuv(). |
|
Definition at line 75 of file xdvshow-sdl.c. Referenced by xdvshow_close_window(), xdvshow_open_window(), and xdvshow_render(). |
|
Definition at line 76 of file xdvshow-sdl.c. Referenced by xdvshow_close_window(), xdvshow_open_window(), and xdvshow_render(). |
|
Definition at line 63 of file xdvshow-sdl.c. Referenced by xdvshow_open_window(), and xdvshow_render(). |
|
Definition at line 73 of file xdvshow-sdl.c. Referenced by Get_resolution(), and xdvshow_open_window(). |
|
Definition at line 65 of file xdvshow-sdl.c. Referenced by xdvshow_SDL_handle_events(). |
|
Definition at line 60 of file xdvshow-sdl.c. Referenced by xdvshow_open_window(). |
|
Definition at line 71 of file xdvshow-sdl.c. Referenced by xdvshow_open_window(), xdvshow_x11_open_window(), and xdvshow_x11_render(). |