1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
|
/*
* xine_frontend.h:
*
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
* $Id$
*
*/
#ifndef _XINE_FRONTEND_H
#define _XINE_FRONTEND_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#define FE_VERSION_STR XINELIBOUTPUT_VERSION /*"1.0.0pre1"*/
typedef struct frontend_config_s frontend_config_t;
typedef struct frontend_s frontend_t;
struct osd_command_s;
#if 0
struct frontend_config_s {
/* Display */
int width;
int height;
int fullscreen;
int modeswitch;
char *modeline;
int aspect;
char *video_port;
int scale_video;
fe_keypress_f keypresshandler;
/* Xine engine */
char *audio_driver;
char *audio_port;
char *video_driver;
int pes_buffers;
int priority;
};
#endif
/* xine_is_finished return values */
#define FE_XINE_RUNNING 0
#define FE_XINE_ERROR -1
#define FE_XINE_EXIT 1
/* return values */
#define FE_OK 1
#define FE_ERROR 0
/* HUD OSD bitmask values */
#define HUD_COMPOSITE 0x1 /* hud in transparent window */
#define HUD_XSHAPE 0x2 /* use XShape */
#define HUD_OPENGL 0x4 /* draw OSD and video using OpenGL */
#define HUD_XRENDER 0x8 /* draw OSD and video using Xrender */
/* Special window_id's */
#define WINDOW_ID_NONE -1
#define WINDOW_ID_ROOT -2
/* Video mode switching flags */
#define MODESWITCH_SIZE 0x1
#define MODESWITCH_RATE 0x2
#define MODESWITCH_INTERLACE 0x4
struct frontend_s {
/* Display */
int (*fe_display_open)(frontend_t*,
int xpos, int ypos,
int winwidth, int winheight,
int fullscreen, int hud, int opengl,
int modeswitch, const char *modeline,
int aspect,
int no_x_kbd, int gui_hotkeys, int touchscreen,
const char *video_port,
int scale_video,
const char *aspect_controller, int window_id);
int (*fe_display_config)(frontend_t *,
int xpos, int ypos,
int width, int height,
int fullscreen,
int modeswitch, const char *modeline,
int aspect, int scale_video);
unsigned char * (*fe_display_edid)(frontend_t *, int *size);
void (*fe_display_close)(frontend_t*);
/* Xine engine */
int (*xine_init)(frontend_t*,
const char *audio_driver,
const char *audio_port,
const char *video_driver,
int pes_buffers,
int ffmpeg_threads,
const char *static_post,
const char *config_file);
int (*xine_open)(frontend_t*, const char *mrl);
int (*xine_play)(frontend_t*);
int (*xine_stop)(frontend_t*);
void (*xine_close)(frontend_t*);
void (*xine_exit)(frontend_t*);
void (*shutdown_init)(frontend_t*, const char *cmd, int timeout);
/* Execution control */
int (*fe_run)(frontend_t*);
void (*fe_interrupt)(frontend_t*);
void (*fe_free)(frontend_t*);
int (*xine_is_finished)(frontend_t*, int slave_stream);
/* Data transfer VDR -> frontend/xine */
int (*xine_osd_command)(frontend_t*, struct osd_command_s *cmd);
int (*xine_control)(frontend_t*, const char *cmd);
int (*xine_queue_pes_packet)(frontend_t*, int stream, uint64_t pos, const char *data, int len);
char *(*grab)(frontend_t*, int *size, int jpeg, int quality,
int width, int height);
/* frontend services: events from frontend -> xine/vdr */
int (*send_event)(frontend_t *fe, const char *data);
int (*send_input_event)(frontend_t *fe,
const char *map, const char *key,
int repeat, int release);
/* Control messages frontend -> VDR (local mode)
* frontend should fill following pointers
*/
void *fe_message_h;
void (*fe_message_cb)(void *, const char *keymap, const char *name);
#if 0
frontend_config_t config;
#endif
};
typedef frontend_t *(*fe_creator_f)(void);
void list_xine_plugins(frontend_t *fe, int verbose);
#ifdef __cplusplus
} /* extern "C" { */
#endif
#endif /* _XINE_FRONTEND_H */
|