Mercurial > mplayer.hg
annotate eosd.h @ 32459:1a605463f62b
Move vobsub.[ch] and unrar_exec.[ch] to the sub directory.
author | cigaes |
---|---|
date | Wed, 27 Oct 2010 16:58:23 +0000 |
parents | fbee56276c87 |
children |
rev | line source |
---|---|
31928 | 1 /* |
2 * Extended On Screen Display | |
3 * Copyright (C) 2010 Nicolas George | |
4 * | |
5 * This file is part of MPlayer. | |
6 * | |
7 * MPlayer is free software; you can redistribute it and/or modify | |
8 * it under the terms of the GNU General Public License as published by | |
9 * the Free Software Foundation; either version 2 of the License, or | |
10 * (at your option) any later version. | |
11 * | |
12 * MPlayer is distributed in the hope that it will be useful, | |
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 * GNU General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU General Public License along | |
18 * with MPlayer; if not, write to the Free Software Foundation, Inc., | |
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
20 */ | |
21 | |
22 #ifndef MPLAYER_EOSD_H | |
23 #define MPLAYER_EOSD_H | |
24 | |
32391
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
25 #include <stdint.h> |
32085 | 26 #include "libmpcodecs/vf.h" |
32391
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
27 |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
28 enum { |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
29 EOSD_CHANGED_LAYOUT = 0x1, |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
30 EOSD_CHANGED_BITMAP = 0x2, |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
31 }; |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
32 |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
33 struct mp_eosd_settings { |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
34 int w, h; ///< screen dimensions, including black borders |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
35 int srcw, srch; ///< unscaled source dimensions |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
36 int mt, mb, ml, mr; ///< borders (top, bottom, left, right) |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
37 int unscaled; ///< EOSD objects are rendered at native resolution |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
38 int changed; ///< settings have changed since last update |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
39 }; |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
40 |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
41 struct mp_eosd_image { |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
42 struct mp_eosd_image *next; ///< Next image, or NULL |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
43 uint8_t *bitmap; ///< 1bpp stride*h alpha buffer |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
44 void *opaque; ///< Arbitrary value for the client's use |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
45 int w, h; ///< Bitmap width, height |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
46 int stride; ///< Bitmap stride |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
47 uint32_t color; ///< Bitmap color and transparency, RGBT |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
48 /// T is the complement of A (alpha=opacity). |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
49 int dst_x, dst_y; ///< Bitmap placement inside the video frame |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
50 }; |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
51 |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
52 struct mp_eosd_source { |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
53 |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
54 /** |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
55 * Linked list of images element. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
56 * The client is responsible for initializing and maintaining this list. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
57 * It can alter it at any time in the main MPlayer thread. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
58 */ |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
59 struct mp_eosd_image *images; |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
60 |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
61 /** |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
62 * Pointer to the next field of the last image, or to images if the list |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
63 * is empty. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
64 * The client is not required to handle this field, but list |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
65 * manipulation functions (see below) use it. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
66 */ |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
67 struct mp_eosd_image **images_tail; |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
68 |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
69 /** |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
70 * Callback to update the images. Can be NULL. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
71 */ |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
72 void (*update)(struct mp_eosd_source *, const struct mp_eosd_settings *, |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
73 double); |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
74 |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
75 /** |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
76 * Callback to uninit the source. Can be NULL. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
77 */ |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
78 void (*uninit)(struct mp_eosd_source *); |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
79 |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
80 /** |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
81 * Changed flags of the images. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
82 * The client must set it to a combination of EOSD_CHANGED_* whenever |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
83 * the images are altered. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
84 * The core EOSD system resets it. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
85 */ |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
86 int changed; |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
87 |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
88 /** |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
89 * Z-index of the images. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
90 * Images with a higher Z-index are rendered on top. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
91 */ |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
92 int z_index; |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
93 |
32426
fbee56276c87
Add a flag "initialized" to the mp_eosd_source structure.
cigaes
parents:
32397
diff
changeset
|
94 /** |
fbee56276c87
Add a flag "initialized" to the mp_eosd_source structure.
cigaes
parents:
32397
diff
changeset
|
95 * Initialized flag of the source. |
fbee56276c87
Add a flag "initialized" to the mp_eosd_source structure.
cigaes
parents:
32397
diff
changeset
|
96 * Set by the source, automatically cleared when a source is added, |
fbee56276c87
Add a flag "initialized" to the mp_eosd_source structure.
cigaes
parents:
32397
diff
changeset
|
97 * removed or reinitialized. |
fbee56276c87
Add a flag "initialized" to the mp_eosd_source structure.
cigaes
parents:
32397
diff
changeset
|
98 */ |
fbee56276c87
Add a flag "initialized" to the mp_eosd_source structure.
cigaes
parents:
32397
diff
changeset
|
99 int initialized; |
fbee56276c87
Add a flag "initialized" to the mp_eosd_source structure.
cigaes
parents:
32397
diff
changeset
|
100 |
32391
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
101 struct mp_eosd_source *priv_next; |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
102 }; |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
103 |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
104 struct mp_eosd_image_list { |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
105 struct mp_eosd_source *first_source; |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
106 struct mp_eosd_source *source; |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
107 struct mp_eosd_image *image; |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
108 int changed; |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
109 }; |
32085 | 110 |
31942
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
111 /** |
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
112 * Initialize the EOSD subsystem. |
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
113 * |
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
114 * @param vf the video filter chain where the rendering will take place. |
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
115 */ |
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
116 void eosd_init(vf_instance_t *vf); |
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
117 |
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
118 /** |
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
119 * Configure the resolution for EOSD rendering. |
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
120 * Should be called by the rendering engine whenever the resolution or |
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
121 * settings change. |
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
122 * |
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
123 * @param res resolution and margins of the rendering area. |
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
124 */ |
32391
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
125 void eosd_configure(struct mp_eosd_settings *res); |
31928 | 126 |
31942
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
127 /** |
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
128 * Renders the EOSD elements for the current frame. |
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
129 * Should be called by the rendering engine when it is about to do or |
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
130 * prepare the rendering. |
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
131 * |
32391
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
132 * @param[in] ts presentation timestamp of the frame. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
133 * @param[out] images list of images to render. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
134 * The list and list elements are only valid until any |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
135 * client alter them. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
136 * The renderer should therefore not call anything that |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
137 * may alter the EOSD elements. |
31942
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
138 */ |
32391
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
139 void eosd_render_frame(double ts, struct mp_eosd_image_list *images); |
31942
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
140 |
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
141 /** |
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
142 * Shut down the EOSD subsystem and free the associated resources. |
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
143 */ |
31928 | 144 void eosd_uninit(void); |
145 | |
31942
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
146 /** |
32391
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
147 * Register a source of EOSD images. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
148 */ |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
149 void eosd_register(struct mp_eosd_source *source); |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
150 |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
151 /** |
32397
b3110e526e19
EOSD: add a function to test if a source has already been registered.
cigaes
parents:
32391
diff
changeset
|
152 * Test whether a source has already been registered. |
b3110e526e19
EOSD: add a function to test if a source has already been registered.
cigaes
parents:
32391
diff
changeset
|
153 */ |
b3110e526e19
EOSD: add a function to test if a source has already been registered.
cigaes
parents:
32391
diff
changeset
|
154 int eosd_registered(struct mp_eosd_source *source); |
b3110e526e19
EOSD: add a function to test if a source has already been registered.
cigaes
parents:
32391
diff
changeset
|
155 |
b3110e526e19
EOSD: add a function to test if a source has already been registered.
cigaes
parents:
32391
diff
changeset
|
156 /** |
32391
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
157 * Allocate a structure for an EOSD image. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
158 */ |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
159 struct mp_eosd_image *eosd_image_alloc(void); |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
160 |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
161 /** |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
162 * Free a previously allocated structure. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
163 */ |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
164 void eosd_image_free(struct mp_eosd_image *image); |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
165 |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
166 /** |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
167 * Append an image to the list of images associated to a source. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
168 * This function requires that the images_tail pointer is correctly set. |
31942
710e01dbd994
Add Doxygen comments and formal parameters names in eosd.h.
cigaes
parents:
31934
diff
changeset
|
169 */ |
32391
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
170 void eosd_image_append(struct mp_eosd_source *source, |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
171 struct mp_eosd_image *image); |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
172 |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
173 /** |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
174 * Remove an image from the list of images associated to a source. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
175 * The image structure is freed using eosd_image_free. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
176 * |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
177 * @param source source where the image is. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
178 * @param image image to remove. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
179 * @param prev pointeur to the prev field of the previous image, |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
180 * or to source->images if this is the first image. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
181 */ |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
182 void eosd_image_remove(struct mp_eosd_source *source, |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
183 struct mp_eosd_image *image, |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
184 struct mp_eosd_image **prev); |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
185 |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
186 /** |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
187 * Remove all images associated to a source and free the corresponding |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
188 * structures. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
189 * This function also resets the images_tail pointer. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
190 */ |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
191 void eosd_image_remove_all(struct mp_eosd_source *source); |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
192 |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
193 /** |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
194 * Reset the cursor of an image list and get the first image. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
195 */ |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
196 struct mp_eosd_image *eosd_image_first(struct mp_eosd_image_list *images); |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
197 |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
198 /** |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
199 * Get the next image in an image list. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
200 * The renderer must NOT use the next field in the image structure. |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
201 */ |
b4c3659d16b1
Use a dynamic list for the sources of EOSD elements.
cigaes
parents:
32209
diff
changeset
|
202 struct mp_eosd_image *eosd_image_next(struct mp_eosd_image_list *images); |
31928 | 203 |
204 #endif /* MPLAYER_EOSD_H */ |