xine-lib 1.2.11
Data Structures | Macros | Typedefs | Functions | Variables
video_out_fb.c File Reference

Frame buffer xine driver. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/time.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <pthread.h>
#include <netinet/in.h>
#include <linux/fb.h>
#include <linux/kd.h>
#include <linux/vt.h>
#include "xine.h"
#include <xine/video_out.h>
#include <xine/xine_internal.h>
#include "yuv2rgb.h"
#include <xine/xineutils.h>
#include <xine/vo_scale.h>

Data Structures

struct  fb_frame_s
 
struct  fb_driver_s
 
struct  fb_class_t
 

Macros

#define RECOMMENDED_NUM_BUFFERS   5
 
#define MAXIMUM_NUM_BUFFERS   25
 
#define LOG_MODULE   "video_out_fb"
 
#define LOG_VERBOSE
 

Typedefs

typedef struct fb_frame_s fb_frame_t
 
typedef struct fb_driver_s fb_driver_t
 

Functions

static uint32_t fb_get_capabilities (vo_driver_t *this_gen)
 
static void fb_frame_proc_slice (vo_frame_t *vo_img, uint8_t **src)
 
static void fb_frame_field (vo_frame_t *vo_img, int which_field)
 
static void fb_frame_dispose (vo_frame_t *vo_img)
 
static vo_frame_tfb_alloc_frame (vo_driver_t *this_gen)
 
static void fb_compute_ideal_size (fb_driver_t *this, fb_frame_t *frame)
 
static void fb_compute_rgb_size (fb_driver_t *this, fb_frame_t *frame)
 
static void setup_colorspace_converter (fb_frame_t *frame, int flags)
 
static void frame_reallocate (fb_driver_t *this, fb_frame_t *frame, uint32_t width, uint32_t height, int format)
 
static void fb_update_frame_format (vo_driver_t *this_gen, vo_frame_t *frame_gen, uint32_t width, uint32_t height, double ratio, int format, int flags)
 
static void fb_overlay_clut_yuv2rgb (fb_driver_t *this, vo_overlay_t *overlay, fb_frame_t *frame)
 
static void fb_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_overlay_t *overlay)
 
static int fb_redraw_needed (vo_driver_t *this_gen)
 
static void fb_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen)
 
static int fb_get_property (vo_driver_t *this_gen, int property)
 
static int fb_set_property (vo_driver_t *this_gen, int property, int value)
 
static void fb_get_property_min_max (vo_driver_t *this_gen, int property, int *min, int *max)
 
static int fb_gui_data_exchange (vo_driver_t *this_gen, int data_type, void *data)
 
static void fb_dispose (vo_driver_t *this_gen)
 
static int get_fb_var_screeninfo (int fd, struct fb_var_screeninfo *var, xine_t *xine)
 
static int get_fb_fix_screeninfo (int fd, struct fb_fix_screeninfo *fix, xine_t *xine)
 
static int set_fb_palette (int fd, const struct fb_var_screeninfo *var)
 
static void register_callbacks (fb_driver_t *this)
 
static int open_fb_device (config_values_t *config, xine_t *xine)
 
static int mode_visual (fb_driver_t *this, config_values_t *config, struct fb_var_screeninfo *var, struct fb_fix_screeninfo *fix)
 
static int setup_yuv2rgb (fb_driver_t *this, config_values_t *config, struct fb_var_screeninfo *var, struct fb_fix_screeninfo *fix)
 
static void setup_buffers (fb_driver_t *this, struct fb_var_screeninfo *var)
 
static vo_driver_tfb_open_plugin (video_driver_class_t *class_gen, const void *visual_gen)
 
static void * fb_init_class (xine_t *xine, const void *visual_gen)
 

Variables

static const vo_info_t vo_info_fb
 
const plugin_info_t xine_plugin_info[] EXPORTED
 

Detailed Description

Frame buffer xine driver.

Author
Miguel Freitas
Fredrik Noring norin.nosp@m.g@no.nosp@m.crew..nosp@m.org: Zero copy buffers and clean up.
Aaron Holtzman aholt.nosp@m.zma@.nosp@m.ess.e.nosp@m.ngr..nosp@m.uvic..nosp@m.ca: Based on xine's video_out_xshm.c, based on mpeg2dec code from
Geert Uytterhoeven and Chris Lawrence: Ideas from ppmtofb - Display P?M graphics on framebuffer devices.
Note
Use this with fbxine.
Todo:
VT Switching (configurable)

Macro Definition Documentation

◆ LOG_MODULE

#define LOG_MODULE   "video_out_fb"

◆ LOG_VERBOSE

#define LOG_VERBOSE

◆ MAXIMUM_NUM_BUFFERS

#define MAXIMUM_NUM_BUFFERS   25

◆ RECOMMENDED_NUM_BUFFERS

#define RECOMMENDED_NUM_BUFFERS   5

Typedef Documentation

◆ fb_driver_t

typedef struct fb_driver_s fb_driver_t

◆ fb_frame_t

typedef struct fb_frame_s fb_frame_t

Function Documentation

◆ fb_alloc_frame()

static vo_frame_t * fb_alloc_frame ( vo_driver_t this_gen)
static

◆ fb_compute_ideal_size()

static void fb_compute_ideal_size ( fb_driver_t this,
fb_frame_t frame 
)
static

◆ fb_compute_rgb_size()

static void fb_compute_rgb_size ( fb_driver_t this,
fb_frame_t frame 
)
static

◆ fb_display_frame()

static void fb_display_frame ( vo_driver_t this_gen,
vo_frame_t frame_gen 
)
static

◆ fb_dispose()

static void fb_dispose ( vo_driver_t this_gen)
static

◆ fb_frame_dispose()

static void fb_frame_dispose ( vo_frame_t vo_img)
static

◆ fb_frame_field()

static void fb_frame_field ( vo_frame_t vo_img,
int  which_field 
)
static

◆ fb_frame_proc_slice()

static void fb_frame_proc_slice ( vo_frame_t vo_img,
uint8_t **  src 
)
static

◆ fb_get_capabilities()

static uint32_t fb_get_capabilities ( vo_driver_t this_gen)
static

◆ fb_get_property()

static int fb_get_property ( vo_driver_t this_gen,
int  property 
)
static

◆ fb_get_property_min_max()

static void fb_get_property_min_max ( vo_driver_t this_gen,
int  property,
int *  min,
int *  max 
)
static

◆ fb_gui_data_exchange()

static int fb_gui_data_exchange ( vo_driver_t this_gen,
int  data_type,
void *  data 
)
static

Referenced by register_callbacks().

◆ fb_init_class()

static void * fb_init_class ( xine_t xine,
const void *  visual_gen 
)
static

◆ fb_open_plugin()

static vo_driver_t * fb_open_plugin ( video_driver_class_t class_gen,
const void *  visual_gen 
)
static

◆ fb_overlay_blend()

static void fb_overlay_blend ( vo_driver_t this_gen,
vo_frame_t frame_gen,
vo_overlay_t overlay 
)
static

◆ fb_overlay_clut_yuv2rgb()

static void fb_overlay_clut_yuv2rgb ( fb_driver_t this,
vo_overlay_t overlay,
fb_frame_t frame 
)
static

◆ fb_redraw_needed()

static int fb_redraw_needed ( vo_driver_t this_gen)
static

Referenced by register_callbacks().

◆ fb_set_property()

static int fb_set_property ( vo_driver_t this_gen,
int  property,
int  value 
)
static

◆ fb_update_frame_format()

static void fb_update_frame_format ( vo_driver_t this_gen,
vo_frame_t frame_gen,
uint32_t  width,
uint32_t  height,
double  ratio,
int  format,
int  flags 
)
static

◆ frame_reallocate()

static void frame_reallocate ( fb_driver_t this,
fb_frame_t frame,
uint32_t  width,
uint32_t  height,
int  format 
)
static

◆ get_fb_fix_screeninfo()

static int get_fb_fix_screeninfo ( int  fd,
struct fb_fix_screeninfo *  fix,
xine_t xine 
)
static

◆ get_fb_var_screeninfo()

static int get_fb_var_screeninfo ( int  fd,
struct fb_var_screeninfo *  var,
xine_t xine 
)
static

◆ mode_visual()

static int mode_visual ( fb_driver_t this,
config_values_t config,
struct fb_var_screeninfo *  var,
struct fb_fix_screeninfo *  fix 
)
static

◆ open_fb_device()

static int open_fb_device ( config_values_t config,
xine_t xine 
)
static

◆ register_callbacks()

static void register_callbacks ( fb_driver_t this)
static

◆ set_fb_palette()

static int set_fb_palette ( int  fd,
const struct fb_var_screeninfo *  var 
)
static

References NULL.

Referenced by fb_open_plugin().

◆ setup_buffers()

static void setup_buffers ( fb_driver_t this,
struct fb_var_screeninfo *  var 
)
static

◆ setup_colorspace_converter()

static void setup_colorspace_converter ( fb_frame_t frame,
int  flags 
)
static

◆ setup_yuv2rgb()

static int setup_yuv2rgb ( fb_driver_t this,
config_values_t config,
struct fb_var_screeninfo *  var,
struct fb_fix_screeninfo *  fix 
)
static

Variable Documentation

◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED
Initial value:
= {
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
static void * fb_init_class(xine_t *xine, const void *visual_gen)
Definition: video_out_fb.c:1082
static const vo_info_t vo_info_fb
Definition: video_out_fb.c:1102
#define XINE_VERSION_CODE
Definition: xine_internal.h:57
NULL
Definition: xine_plugin.c:78
#define PLUGIN_NONE
Definition: xine_plugin.h:29
#define PLUGIN_VIDEO_OUT
Definition: xine_plugin.h:36

◆ vo_info_fb

const vo_info_t vo_info_fb
static
Initial value:
= {
.priority = 1,
.visual_type = XINE_VISUAL_TYPE_FB,
}
#define XINE_VISUAL_TYPE_FB
Definition: xine.h:157