xine-lib 1.2.11
xine_plugin.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2000-2018 the xine project
3 *
4 * This file is part of xine, a free video player.
5 *
6 * xine is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * xine is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19 *
20 * generic plugin definitions
21 */
22
23#ifndef XINE_PLUGIN_H
24#define XINE_PLUGIN_H
25
26#include <xine/attributes.h>
27#include <xine/os_types.h>
28
29#define PLUGIN_NONE 0
30#define PLUGIN_INPUT 1
31#define PLUGIN_DEMUX 2
32#define PLUGIN_AUDIO_DECODER 3
33#define PLUGIN_VIDEO_DECODER 4
34#define PLUGIN_SPU_DECODER 5
35#define PLUGIN_AUDIO_OUT 6
36#define PLUGIN_VIDEO_OUT 7
37#define PLUGIN_POST 8
38
39#define PLUGIN_TYPE_MAX PLUGIN_POST
40
41#define PLUGIN_XINE_MODULE 0x10
42
43/* this flag may be or'ed with type in order to force preloading the plugin.
44 * very useful to register config items on xine initialization.
45 */
46#define PLUGIN_MUST_PRELOAD (1 << 7)
47
48/* this flag may be or'ed with type to prevent the plugin loader from unloading
49 * the plugin
50 */
51#define PLUGIN_NO_UNLOAD (1 << 6)
52
53#define PLUGIN_TYPE_MASK ((1 << 6) - 1)
54
55typedef struct {
56 uint8_t type; /* one of the PLUGIN_* constants above */
57 uint8_t API; /* API version supported by this plugin */
58 const char *id; /* a name that identifies this plugin */
59 uint32_t version; /* version number, increased every release */
60 const void *special_info; /* plugin-type specific, see structs below */
61 void *(*init)(xine_t *, const void *); /* init the plugin class */
63
64
65/* special_info for a video output plugin */
66typedef struct {
67 int priority; /* priority of this plugin for auto-probing */
68 int visual_type; /* visual type supported by this plugin */
69} vo_info_t;
70
71/* special info for a audio output plugin */
72typedef struct {
74} ao_info_t;
75
76/* special_info for a decoder plugin */
77typedef struct {
78 const uint32_t *supported_types; /* streamtypes this decoder can handle */
81
82/* special info for a post plugin */
83typedef struct {
84 uint32_t type; /* type of the post plugin, use one of XINE_POST_TYPE_* */
86
87/* special info for a demuxer plugin */
88typedef struct {
91
92/* special info for an input plugin */
93typedef struct {
96
97
98/* special info for generic loadable module
99 * examples:
100 * { .type = "tls_v1" },
101 * { .type = "gl_v1", .sub_type = XINE_VISUAL_TYPE_X11 },
102 */
103typedef struct {
105 char type[16]; /* plugin type (and version) */
106 unsigned int sub_type;
108
109
110/* register a list of statically linked plugins
111 * info is a list of plugin_info_t terminated by PLUGIN_NONE
112 * example:
113 * plugin_info_t acme_plugin_info[] = {
114 * { PLUGIN_VIDEO_OUT, 21, "acme", XINE_VERSION_CODE, &vo_info_acme,
115 * init_class_acme },
116 * { PLUGIN_NONE, 0, "", 0, NULL, NULL }
117 * };
118 *
119 */
121
122#endif
#define XINE_PROTECTED
Definition: attributes.h:75
Definition: xine_plugin.h:72
int priority
Definition: xine_plugin.h:73
Definition: xine_plugin.h:77
int priority
Definition: xine_plugin.h:79
const uint32_t * supported_types
Definition: xine_plugin.h:78
Definition: xine_plugin.h:88
int priority
Definition: xine_plugin.h:89
Definition: xine_plugin.h:93
int priority
Definition: xine_plugin.h:94
Definition: xine_plugin.h:55
const void * special_info
Definition: xine_plugin.h:60
uint8_t API
Definition: xine_plugin.h:57
const char * id
Definition: xine_plugin.h:58
uint8_t type
Definition: xine_plugin.h:56
uint32_t version
Definition: xine_plugin.h:59
Definition: xine_plugin.h:83
uint32_t type
Definition: xine_plugin.h:84
Definition: xine_plugin.h:66
int priority
Definition: xine_plugin.h:67
int visual_type
Definition: xine_plugin.h:68
Definition: xine_plugin.h:103
int priority
Definition: xine_plugin.h:104
unsigned int sub_type
Definition: xine_plugin.h:106
Definition: xine_internal.h:80
void xine_register_plugins(xine_t *self, const plugin_info_t *info)
Definition: load_plugins.c:708