From de1735a24c1d985b8163125dd9fc6407e021d165 Mon Sep 17 00:00:00 2001 From: phintuka Date: Mon, 10 Nov 2008 23:59:35 +0000 Subject: Moved fe_t to header --- xine_frontend.c | 63 +++----------------------------------- xine_frontend_internal.h | 79 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 58 deletions(-) create mode 100644 xine_frontend_internal.h diff --git a/xine_frontend.c b/xine_frontend.c index db828e05..d09a5047 100644 --- a/xine_frontend.c +++ b/xine_frontend.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_frontend.c,v 1.72 2008-11-04 12:19:07 phintuka Exp $ + * $Id: xine_frontend.c,v 1.73 2008-11-10 23:59:35 phintuka Exp $ * */ @@ -19,67 +19,14 @@ #define LOG_MODULENAME "[vdr-fe] " #include "logdefs.h" +#include "xine_frontend_internal.h" #include "xine/post.h" -/* - * data - */ - - -typedef struct fe_s { - /* function pointers */ - frontend_t fe; - void (*update_display_size) (struct fe_s *); - void (*toggle_fullscreen_state)(struct fe_s *); - - /* vdr callbacks */ - fe_keypress_f keypress; - - /* xine stuff */ - xine_t *xine; - xine_stream_t *stream; - xine_stream_t *slave_stream; - vdr_input_plugin_if_t *input_plugin; - xine_video_port_t *video_port; - xine_video_port_t *video_port_none; - xine_audio_port_t *audio_port; - xine_audio_port_t *audio_port_none; - xine_event_queue_t *event_queue; - - post_plugins_t *postplugins; - char *video_port_name; /* frame buffer device */ - char *aspect_controller; /* path to external HW aspect ratio controller */ - char *configfile; /* path of our config file */ - - int xine_visual_type; - union { - void *vis; - fb_visual_t vis_fb; - x11_visual_t vis_x11; - }; - - /* frontend */ - double video_aspect; /* aspect ratio of video frame */ - double display_ratio; /* aspect ratio of video window */ - uint16_t xpos, ypos; /* position of video window */ - uint16_t width; /* size of video window */ - uint16_t height; /* */ - uint16_t video_width; /* size of video frame */ - uint16_t video_height; /* */ - uint16_t pes_buffers; /* max. number of PES packets in video fifo */ - uint8_t aspect; /* aspect ratio of video window (user setting) */ - uint8_t overscan; /* overscan in % (crop video borders) */ -/*uint8_t cropping : 1;*/ - uint8_t scale_video : 1; /* enable/disable all video scaling */ - uint8_t field_order : 1; /* invert top/bottom field order */ - uint8_t playback_finished : 1; - uint8_t slave_playback_finished : 1; - -} fe_t; static int verbose_xine_log = 0; -static inline char *strn0cpy(char *dest, const char *src, int n) + +char *strn0cpy(char *dest, const char *src, int n) { char *s = dest; for ( ; --n && (*dest = *src) != 0; dest++, src++) ; @@ -1217,7 +1164,7 @@ static int xine_queue_pes_packet(frontend_t *this_gen, const char *data, int len #else /* #ifndef FE_STANDALONE */ -static void process_xine_keypress(fe_t *this, +void process_xine_keypress(fe_t *this, const char *map, const char *key, int repeat, int release) { diff --git a/xine_frontend_internal.h b/xine_frontend_internal.h new file mode 100644 index 00000000..221c7e1c --- /dev/null +++ b/xine_frontend_internal.h @@ -0,0 +1,79 @@ +/* + * xine_frontend_internal.h: + * + * See the main source file 'xineliboutput.c' for copyright information and + * how to reach the author. + * + * $Id: xine_frontend_internal.h,v 1.1 2008-11-10 23:59:35 phintuka Exp $ + * + */ + +#ifndef XINE_FRONTEND_INTERNAL_H +#define XINE_FRONTEND_INTERNAL_H + +#include +#include + +#include "xine_frontend.h" +#include "xine_input_vdr.h" +#include "xine/post.h" + +typedef struct fe_s { + /* function pointers */ + frontend_t fe; + void (*update_display_size) (struct fe_s *); + void (*toggle_fullscreen_state)(struct fe_s *); + + /* vdr callbacks */ + fe_keypress_f keypress; + + /* xine stuff */ + xine_t *xine; + xine_stream_t *stream; + xine_stream_t *slave_stream; + vdr_input_plugin_if_t *input_plugin; + xine_video_port_t *video_port; + xine_video_port_t *video_port_none; + xine_audio_port_t *audio_port; + xine_audio_port_t *audio_port_none; + xine_event_queue_t *event_queue; + + post_plugins_t *postplugins; + char *video_port_name; /* frame buffer device */ + char *aspect_controller; /* path to external HW aspect ratio controller */ + char *configfile; /* path of our config file */ + + int xine_visual_type; + union { + void *vis; + fb_visual_t vis_fb; + x11_visual_t vis_x11; + }; + + /* frontend */ + double video_aspect; /* aspect ratio of video frame */ + double display_ratio; /* aspect ratio of video window */ + uint16_t xpos, ypos; /* position of video window */ + uint16_t width; /* size of video window */ + uint16_t height; /* */ + uint16_t video_width; /* size of video frame */ + uint16_t video_height; /* */ + uint16_t pes_buffers; /* max. number of PES packets in video fifo */ + uint8_t aspect; /* aspect ratio of video window (user setting) */ + uint8_t overscan; /* overscan in % (crop video borders) */ +/*uint8_t cropping : 1;*/ + uint8_t scale_video : 1; /* enable/disable all video scaling */ + uint8_t field_order : 1; /* invert top/bottom field order */ + uint8_t playback_finished : 1; + uint8_t slave_playback_finished : 1; + +} fe_t; + + +void process_xine_keypress(fe_t *this, + const char *map, const char *key, + int repeat, int release); + +char *strn0cpy(char *dest, const char *src, int n); + +#endif /* XINE_FRONTEND_INTERNAL_H */ -- cgit v1.2.3