Mercurial > mplayer.hg
annotate gui/interface.h @ 35227:6b08a8332561
Fix variable declarations I stupidly forgot to make "static".
author | reimar |
---|---|
date | Thu, 01 Nov 2012 19:01:32 +0000 |
parents | 5a45efc630b8 |
children | 11408d97de7a |
rev | line source |
---|---|
26458 | 1 /* |
2 * This file is part of MPlayer. | |
3 * | |
4 * MPlayer is free software; you can redistribute it and/or modify | |
5 * it under the terms of the GNU General Public License as published by | |
6 * the Free Software Foundation; either version 2 of the License, or | |
7 * (at your option) any later version. | |
8 * | |
9 * MPlayer is distributed in the hope that it will be useful, | |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 * GNU General Public License for more details. | |
13 * | |
14 * You should have received a copy of the GNU General Public License along | |
15 * with MPlayer; if not, write to the Free Software Foundation, Inc., | |
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
17 */ | |
18 | |
26029 | 19 #ifndef MPLAYER_GUI_INTERFACE_H |
20 #define MPLAYER_GUI_INTERFACE_H | |
23077 | 21 |
26382
b2f4abcf20ed
Make include paths consistent; do not use ../ in them.
diego
parents:
26029
diff
changeset
|
22 #include "config.h" |
33774
474ffcdcc6e7
Change guiInterface_t void pointer member declarations.
ib
parents:
33773
diff
changeset
|
23 #include "libaf/af.h" |
474ffcdcc6e7
Change guiInterface_t void pointer member declarations.
ib
parents:
33773
diff
changeset
|
24 #include "libmpdemux/stheader.h" |
30533
e3e329bc727a
Avoid forward declarations for import_initial_playtree_into_gui() and
diego
parents:
29263
diff
changeset
|
25 #include "m_config.h" |
33774
474ffcdcc6e7
Change guiInterface_t void pointer member declarations.
ib
parents:
33773
diff
changeset
|
26 #include "mp_core.h" |
30533
e3e329bc727a
Avoid forward declarations for import_initial_playtree_into_gui() and
diego
parents:
29263
diff
changeset
|
27 #include "playtree.h" |
29149 | 28 #include "stream/stream.h" |
23077 | 29 |
33021 | 30 // These are in support of the non-GUI files that interact with |
31 // the GUI and that only need to include interface.h for this. | |
32 // ------------------------------------------------------------ | |
32984 | 33 #include "cfg.h" |
23077 | 34 |
33021 | 35 extern int use_gui; // this is defined in mplayer.c |
36 // ------------------------------------------------------------ | |
37 | |
33466 | 38 #define GMPlayer "gmplayer" |
39 | |
33980 | 40 /// gui() instructions |
33767 | 41 enum { |
42 GUI_END_FILE, | |
43 GUI_HANDLE_EVENTS, | |
44 GUI_HANDLE_X_EVENT, | |
45 GUI_PREPARE, | |
46 GUI_REDRAW, | |
47 GUI_RUN_COMMAND, | |
34339 | 48 GUI_RUN_MESSAGE, |
33767 | 49 GUI_SETUP_VIDEO_WINDOW, |
50 GUI_SET_AFILTER, | |
51 GUI_SET_AUDIO, | |
52 GUI_SET_CONTEXT, | |
53 GUI_SET_MIXER, | |
54 GUI_SET_STATE, | |
55 GUI_SET_STREAM, | |
56 GUI_SET_VIDEO | |
57 }; | |
23077 | 58 |
33980 | 59 //@{ |
60 /// Playing state | |
33614 | 61 #define GUI_STOP 0 |
62 #define GUI_PLAY 1 | |
63 #define GUI_PAUSE 2 | |
33980 | 64 //@} |
23077 | 65 |
33980 | 66 //@{ |
67 /// NewPlay reason | |
33890 | 68 #define GUI_FILE_SAME 1 |
69 #define GUI_FILE_NEW 2 | |
33980 | 70 //@} |
33890 | 71 |
33980 | 72 /// mplayer() instructions |
33767 | 73 enum { |
33768 | 74 MPLAYER_EXIT_GUI, |
33767 | 75 MPLAYER_SET_AUTO_QUALITY, |
76 MPLAYER_SET_BRIGHTNESS, | |
77 MPLAYER_SET_CONTRAST, | |
78 MPLAYER_SET_EQUALIZER, | |
79 MPLAYER_SET_EXTRA_STEREO, | |
80 MPLAYER_SET_FONT_AUTOSCALE, | |
81 MPLAYER_SET_FONT_BLUR, | |
82 MPLAYER_SET_FONT_ENCODING, | |
83 MPLAYER_SET_FONT_FACTOR, | |
84 MPLAYER_SET_FONT_OSDSCALE, | |
85 MPLAYER_SET_FONT_OUTLINE, | |
86 MPLAYER_SET_FONT_TEXTSCALE, | |
87 MPLAYER_SET_HUE, | |
88 MPLAYER_SET_PANSCAN, | |
89 MPLAYER_SET_SATURATION, | |
90 MPLAYER_SET_SUB_ENCODING | |
91 }; | |
23077 | 92 |
32984 | 93 typedef struct { |
33774
474ffcdcc6e7
Change guiInterface_t void pointer member declarations.
ib
parents:
33773
diff
changeset
|
94 MPContext *mpcontext; |
474ffcdcc6e7
Change guiInterface_t void pointer member declarations.
ib
parents:
33773
diff
changeset
|
95 sh_video_t *sh_video; |
474ffcdcc6e7
Change guiInterface_t void pointer member declarations.
ib
parents:
33773
diff
changeset
|
96 af_stream_t *afilter; |
32984 | 97 |
33944 | 98 int VideoWindow; |
33901 | 99 int VideoWidth; |
100 int VideoHeight; | |
32984 | 101 |
34076 | 102 int StreamType; |
33900 | 103 int AudioChannels; |
104 | |
33902 | 105 int AudioStreams; |
106 stream_language_t AudioStream[32]; | |
107 | |
108 int Subtitles; | |
109 stream_language_t Subtitle[32]; | |
110 | |
33900 | 111 char *Filename; // public, read access by MPlayer |
112 char *AudioFilename; | |
113 char *SubtitleFilename; | |
32984 | 114 |
33876
4789b8eed97e
Get rid of a bunch of needless or redundant guiInfo members.
ib
parents:
33791
diff
changeset
|
115 int Tracks; |
33900 | 116 int Track; // public, read access by MPlayer |
117 int Chapters; | |
118 int Chapter; // public, write access by MPlayer | |
119 int Angles; | |
120 int Angle; | |
121 | |
122 int Playing; // public, read access by MPlayer | |
123 | |
124 int RunningTime; // public, write access by MPlayer | |
125 int ElapsedTime; // public, write access by MPlayer | |
126 float Position; // public, write access by MPlayer | |
32984 | 127 |
128 float Volume; | |
129 float Balance; | |
130 | |
33900 | 131 int NewPlay; // public, read access by MPlayer |
32984 | 132 } guiInterface_t; |
133 | |
33555 | 134 extern guiInterface_t guiInfo; |
32984 | 135 |
33980 | 136 /// @name MPlayer -> GUI |
137 //@{ | |
33791
8b0c78a85a8c
Cosmetic: Change parameter names of gui() and mplayer().
ib
parents:
33790
diff
changeset
|
138 int gui(int what, void *data); |
32984 | 139 void guiDone(void); |
140 void guiInit(void); | |
33764 | 141 int guiPlaylistAdd(play_tree_t *my_playtree, m_config_t *config); |
33752 | 142 int guiPlaylistInitialize(play_tree_t *my_playtree, m_config_t *config, int enqueue); |
33980 | 143 //@} |
23077 | 144 |
33980 | 145 /// @name GUI -> MPlayer |
146 //@{ | |
33791
8b0c78a85a8c
Cosmetic: Change parameter names of gui() and mplayer().
ib
parents:
33790
diff
changeset
|
147 void mplayer(int what, float value, void *data); |
33763 | 148 void mplayerLoadFont(void); |
33790
ab6d06f5b98b
Add const to some string pointer arguments that will not be modified.
ib
parents:
33776
diff
changeset
|
149 void mplayerLoadSubtitle(const char *name); |
33764 | 150 void gmp_msg(int mod, int lev, const char *format, ...); |
33980 | 151 //@} |
33745 | 152 |
26029 | 153 #endif /* MPLAYER_GUI_INTERFACE_H */ |