Mercurial > mplayer.hg
annotate gui/interface.h @ 33897:e0d211c62cf7
Cosmetic: Rename some guiInfo members.
Rename TimeSec ElapsedTime and LengthInSec RunningTime for clarity.
Rename AudioFile AudioFilename and Subtitlename SubtitleFilename
for consistency.
author | ib |
---|---|
date | Fri, 12 Aug 2011 15:25:30 +0000 |
parents | b2e63fe7fe17 |
children | b2fcff7e2157 |
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 | |
33893
acfe0bf9a847
Cosmetic: Comment the enums and #defines in interface.h.
ib
parents:
33890
diff
changeset
|
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, | |
48 GUI_SETUP_VIDEO_WINDOW, | |
49 GUI_SET_AFILTER, | |
50 GUI_SET_AUDIO, | |
51 GUI_SET_CONTEXT, | |
52 GUI_SET_FILE, | |
53 GUI_SET_MIXER, | |
54 GUI_SET_STATE, | |
55 GUI_SET_STREAM, | |
56 GUI_SET_VIDEO | |
57 }; | |
23077 | 58 |
33893
acfe0bf9a847
Cosmetic: Comment the enums and #defines in interface.h.
ib
parents:
33890
diff
changeset
|
59 // Playing states |
33614 | 60 #define GUI_STOP 0 |
61 #define GUI_PLAY 1 | |
62 #define GUI_PAUSE 2 | |
23077 | 63 |
33893
acfe0bf9a847
Cosmetic: Comment the enums and #defines in interface.h.
ib
parents:
33890
diff
changeset
|
64 // NewPlay reasons |
33890 | 65 #define GUI_FILE_SAME 1 |
66 #define GUI_FILE_NEW 2 | |
67 | |
33893
acfe0bf9a847
Cosmetic: Comment the enums and #defines in interface.h.
ib
parents:
33890
diff
changeset
|
68 // mplayer() instructions |
33767 | 69 enum { |
33768 | 70 MPLAYER_EXIT_GUI, |
33767 | 71 MPLAYER_SET_AUTO_QUALITY, |
72 MPLAYER_SET_BRIGHTNESS, | |
73 MPLAYER_SET_CONTRAST, | |
74 MPLAYER_SET_EQUALIZER, | |
75 MPLAYER_SET_EXTRA_STEREO, | |
76 MPLAYER_SET_FONT_AUTOSCALE, | |
77 MPLAYER_SET_FONT_BLUR, | |
78 MPLAYER_SET_FONT_ENCODING, | |
79 MPLAYER_SET_FONT_FACTOR, | |
80 MPLAYER_SET_FONT_OSDSCALE, | |
81 MPLAYER_SET_FONT_OUTLINE, | |
82 MPLAYER_SET_FONT_TEXTSCALE, | |
83 MPLAYER_SET_HUE, | |
84 MPLAYER_SET_PANSCAN, | |
85 MPLAYER_SET_SATURATION, | |
86 MPLAYER_SET_SUB_ENCODING | |
87 }; | |
23077 | 88 |
32984 | 89 typedef struct { |
90 int nr_of_audio_channels; | |
91 stream_language_t audio_streams[32]; | |
92 int nr_of_subtitles; | |
93 stream_language_t subtitles[32]; | |
94 } guiDVDStruct; | |
95 | |
96 typedef struct { | |
33774
474ffcdcc6e7
Change guiInterface_t void pointer member declarations.
ib
parents:
33773
diff
changeset
|
97 MPContext *mpcontext; |
474ffcdcc6e7
Change guiInterface_t void pointer member declarations.
ib
parents:
33773
diff
changeset
|
98 sh_video_t *sh_video; |
474ffcdcc6e7
Change guiInterface_t void pointer member declarations.
ib
parents:
33773
diff
changeset
|
99 af_stream_t *afilter; |
32984 | 100 |
101 int NewPlay; | |
102 | |
103 #ifdef CONFIG_DVDREAD | |
104 guiDVDStruct DVD; | |
33876
4789b8eed97e
Get rid of a bunch of needless or redundant guiInfo members.
ib
parents:
33791
diff
changeset
|
105 int Chapters; |
4789b8eed97e
Get rid of a bunch of needless or redundant guiInfo members.
ib
parents:
33791
diff
changeset
|
106 int Chapter; |
4789b8eed97e
Get rid of a bunch of needless or redundant guiInfo members.
ib
parents:
33791
diff
changeset
|
107 int Angles; |
32984 | 108 int Angle; |
109 #endif | |
110 | |
33876
4789b8eed97e
Get rid of a bunch of needless or redundant guiInfo members.
ib
parents:
33791
diff
changeset
|
111 #if defined(CONFIG_VCD) || defined(CONFIG_DVDREAD) |
4789b8eed97e
Get rid of a bunch of needless or redundant guiInfo members.
ib
parents:
33791
diff
changeset
|
112 int Tracks; |
32984 | 113 #endif |
114 | |
115 int Playing; | |
116 float Position; | |
117 | |
118 int MovieWidth; | |
119 int MovieHeight; | |
33655 | 120 int MovieWindow; |
32984 | 121 |
122 float Volume; | |
123 float Balance; | |
124 | |
125 int Track; | |
33646 | 126 int AudioChannels; |
32984 | 127 int StreamType; |
33897 | 128 int ElapsedTime; |
129 int RunningTime; | |
32984 | 130 |
131 char *Filename; | |
132 | |
33897 | 133 char *SubtitleFilename; |
32984 | 134 |
33897 | 135 char *AudioFilename; |
32984 | 136 } guiInterface_t; |
137 | |
33555 | 138 extern guiInterface_t guiInfo; |
32984 | 139 |
33745 | 140 /* MPlayer -> GUI */ |
141 | |
33791
8b0c78a85a8c
Cosmetic: Change parameter names of gui() and mplayer().
ib
parents:
33790
diff
changeset
|
142 int gui(int what, void *data); |
32984 | 143 void guiDone(void); |
144 void guiInit(void); | |
33764 | 145 int guiPlaylistAdd(play_tree_t *my_playtree, m_config_t *config); |
33752 | 146 int guiPlaylistInitialize(play_tree_t *my_playtree, m_config_t *config, int enqueue); |
23077 | 147 |
33746 | 148 /* GUI -> MPlayer */ |
149 | |
33791
8b0c78a85a8c
Cosmetic: Change parameter names of gui() and mplayer().
ib
parents:
33790
diff
changeset
|
150 void mplayer(int what, float value, void *data); |
33763 | 151 void mplayerLoadFont(void); |
33790
ab6d06f5b98b
Add const to some string pointer arguments that will not be modified.
ib
parents:
33776
diff
changeset
|
152 void mplayerLoadSubtitle(const char *name); |
33764 | 153 void gmp_msg(int mod, int lev, const char *format, ...); |
33745 | 154 |
26029 | 155 #endif /* MPLAYER_GUI_INTERFACE_H */ |