xine-lib 1.2.11
Data Structures | Macros | Typedefs | Functions | Variables
video_out_mmal.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <bcm_host.h>
#include <interface/mmal/mmal.h>
#include <interface/mmal/util/mmal_util.h>
#include <interface/mmal/util/mmal_default_components.h>
#include <interface/vmcs_host/vc_dispmanx.h>
#include "xine.h"
#include <xine/xine_internal.h>
#include <xine/video_out.h>
#include <xine/xineutils.h>

Data Structures

struct  mmal_frame_t
 
struct  mmal_overlay_s
 
struct  mmal_driver_t
 
struct  mmal_class_t
 

Macros

#define LOG_MODULE   "video_out_mmal"
 
#define LOG_VERBOSE
 
#define FRAME_ALLOC   /* allocate buffer based on frame size. if not defined, all buffers are suitable for 1920x1088 YUY2. */
 
#define HW_OVERLAY   /* draw overlay using HW. if undefined, draw in software. */
 
#define MAX_VIDEO_WIDTH   (2*1920)
 
#define MAX_VIDEO_HEIGHT   (2*1088)
 
#define MAX_VIDEO_FRAMES   20
 
#define LOG_STATUS(msg)
 

Typedefs

typedef struct mmal_overlay_s mmal_overlay_t
 

Functions

static int update_tv_resolution (mmal_driver_t *this)
 
static int config_display (mmal_driver_t *this, int src_x, int src_y, int src_w, int src_h)
 
static void control_port_cb (MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer)
 
static void input_port_cb (MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer)
 
static void disable_renderer (mmal_driver_t *this)
 
static int configure_renderer (mmal_driver_t *this, int format, int width, int height, int crop_x, int crop_y, int crop_w, int crop_h, double ratio)
 
static uint32_t mmal_get_capabilities (vo_driver_t *this_gen)
 
static void mmal_frame_field (vo_frame_t *vo_img, int which_field)
 
static void mmal_frame_dispose (vo_frame_t *vo_img)
 
static vo_frame_tmmal_alloc_frame (vo_driver_t *this_gen)
 
static void mmal_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 overlay_free (mmal_overlay_t *ovl, DISPMANX_UPDATE_HANDLE_T update)
 
static void overlay_update (mmal_overlay_t *ovl, DISPMANX_UPDATE_HANDLE_T update, uint32_t *argb)
 
static mmal_overlay_toverlay_new (mmal_driver_t *this, DISPMANX_UPDATE_HANDLE_T update, int src_width, int src_height, int src_pitch, int x, int y, int width, int height, int layer, uint32_t *argb)
 
static void close_overlays (mmal_driver_t *this, mmal_overlay_t *ovls)
 
static void mmal_overlay_begin (vo_driver_t *this_gen, vo_frame_t *frame_gen, int changed)
 
static void mmal_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame, vo_overlay_t *overlay)
 
static void mmal_overlay_end (vo_driver_t *this_gen, vo_frame_t *frame_gen)
 
static int mmal_redraw_needed (vo_driver_t *this_gen)
 
static void mmal_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen)
 
static int mmal_get_property (vo_driver_t *this_gen, int property)
 
static int mmal_set_property (vo_driver_t *this_gen, int property, int value)
 
static void mmal_get_property_min_max (vo_driver_t *this_gen, int property, int *min, int *max)
 
static int mmal_gui_data_exchange (vo_driver_t *this_gen, int data_type, void *data)
 
static void mmal_dispose (vo_driver_t *this_gen)
 
static vo_driver_topen_plugin (video_driver_class_t *class_gen, const void *visual_gen)
 
static void * init_class (xine_t *xine, const void *visual_gen)
 

Variables

static const vo_info_t vo_info_mmal
 
const plugin_info_t xine_plugin_info[] EXPORTED
 

Macro Definition Documentation

◆ FRAME_ALLOC

#define FRAME_ALLOC   /* allocate buffer based on frame size. if not defined, all buffers are suitable for 1920x1088 YUY2. */

◆ HW_OVERLAY

#define HW_OVERLAY   /* draw overlay using HW. if undefined, draw in software. */

◆ LOG_MODULE

#define LOG_MODULE   "video_out_mmal"

◆ LOG_STATUS

#define LOG_STATUS (   msg)
Value:
xprintf(this->xine, XINE_VERBOSITY_LOG, LOG_MODULE": " msg ": %s (%d)\n", \
mmal_status_to_string(status), status)
#define LOG_MODULE
Definition: video_out_mmal.c:38
#define XINE_VERBOSITY_LOG
Definition: xine.h:425
#define xprintf(xine, verbose,...)
Definition: xineutils.h:673

◆ LOG_VERBOSE

#define LOG_VERBOSE

◆ MAX_VIDEO_FRAMES

#define MAX_VIDEO_FRAMES   20

◆ MAX_VIDEO_HEIGHT

#define MAX_VIDEO_HEIGHT   (2*1088)

◆ MAX_VIDEO_WIDTH

#define MAX_VIDEO_WIDTH   (2*1920)

Typedef Documentation

◆ mmal_overlay_t

Function Documentation

◆ close_overlays()

static void close_overlays ( mmal_driver_t this,
mmal_overlay_t ovls 
)
static

◆ config_display()

static int config_display ( mmal_driver_t this,
int  src_x,
int  src_y,
int  src_w,
int  src_h 
)
static

References LOG_STATUS.

Referenced by mmal_display_frame(), and open_plugin().

◆ configure_renderer()

static int configure_renderer ( mmal_driver_t this,
int  format,
int  width,
int  height,
int  crop_x,
int  crop_y,
int  crop_w,
int  crop_h,
double  ratio 
)
static

◆ control_port_cb()

static void control_port_cb ( MMAL_PORT_T *  port,
MMAL_BUFFER_HEADER_T *  buffer 
)
static

References LOG_STATUS.

Referenced by configure_renderer().

◆ disable_renderer()

static void disable_renderer ( mmal_driver_t this)
static

Referenced by configure_renderer(), and mmal_dispose().

◆ init_class()

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

Class Functions

References default_video_driver_class_dispose, N_, NULL, and open_plugin().

◆ input_port_cb()

static void input_port_cb ( MMAL_PORT_T *  port,
MMAL_BUFFER_HEADER_T *  buffer 
)
static

Referenced by configure_renderer().

◆ mmal_alloc_frame()

static vo_frame_t * mmal_alloc_frame ( vo_driver_t this_gen)
static

◆ mmal_display_frame()

static void mmal_display_frame ( vo_driver_t this_gen,
vo_frame_t frame_gen 
)
static

◆ mmal_dispose()

static void mmal_dispose ( vo_driver_t this_gen)
static

◆ mmal_frame_dispose()

static void mmal_frame_dispose ( vo_frame_t vo_img)
static

◆ mmal_frame_field()

static void mmal_frame_field ( vo_frame_t vo_img,
int  which_field 
)
static

Referenced by mmal_alloc_frame().

◆ mmal_get_capabilities()

static uint32_t mmal_get_capabilities ( vo_driver_t this_gen)
static

◆ mmal_get_property()

static int mmal_get_property ( vo_driver_t this_gen,
int  property 
)
static

◆ mmal_get_property_min_max()

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

Referenced by open_plugin().

◆ mmal_gui_data_exchange()

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

Referenced by open_plugin().

◆ mmal_overlay_begin()

static void mmal_overlay_begin ( vo_driver_t this_gen,
vo_frame_t frame_gen,
int  changed 
)
static

References NULL, overlay_update(), and xine_container_of.

Referenced by open_plugin().

◆ mmal_overlay_blend()

static void mmal_overlay_blend ( vo_driver_t this_gen,
vo_frame_t frame,
vo_overlay_t overlay 
)
static

◆ mmal_overlay_end()

static void mmal_overlay_end ( vo_driver_t this_gen,
vo_frame_t frame_gen 
)
static

◆ mmal_redraw_needed()

static int mmal_redraw_needed ( vo_driver_t this_gen)
static

Referenced by open_plugin().

◆ mmal_set_property()

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

Referenced by open_plugin().

◆ mmal_update_frame_format()

static void mmal_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

◆ open_plugin()

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

◆ overlay_free()

static void overlay_free ( mmal_overlay_t ovl,
DISPMANX_UPDATE_HANDLE_T  update 
)
static

◆ overlay_new()

static mmal_overlay_t * overlay_new ( mmal_driver_t this,
DISPMANX_UPDATE_HANDLE_T  update,
int  src_width,
int  src_height,
int  src_pitch,
int  x,
int  y,
int  width,
int  height,
int  layer,
uint32_t *  argb 
)
static

◆ overlay_update()

static void overlay_update ( mmal_overlay_t ovl,
DISPMANX_UPDATE_HANDLE_T  update,
uint32_t *  argb 
)
static

◆ update_tv_resolution()

static int update_tv_resolution ( mmal_driver_t this)
static

Variable Documentation

◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED
Initial value:
= {
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
static const vo_info_t vo_info_mmal
Definition: video_out_mmal.c:924
static void * init_class(xine_t *xine, const void *visual_gen)
Definition: video_out_mmal.c:907
#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_mmal

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