annotate gui/interface.h @ 33872:d7bc4bcc3523

Support parsing of AAC audio. Fixes playing of files with AAC audio with native demuxer and lavc decoder.
author reimar
date Tue, 09 Aug 2011 20:14:30 +0000
parents 8b0c78a85a8c
children 4789b8eed97e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26458
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
1 /*
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
2 * This file is part of MPlayer.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
3 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
4 * MPlayer is free software; you can redistribute it and/or modify
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
5 * it under the terms of the GNU General Public License as published by
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
7 * (at your option) any later version.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
8 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
9 * MPlayer is distributed in the hope that it will be useful,
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
12 * GNU General Public License for more details.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
13 *
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
14 * You should have received a copy of the GNU General Public License along
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
17 */
b0a7b35b78d2 Add standard GPL header to individual files.
diego
parents: 26382
diff changeset
18
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25607
diff changeset
19 #ifndef MPLAYER_GUI_INTERFACE_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25607
diff changeset
20 #define MPLAYER_GUI_INTERFACE_H
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
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
8c3fbc5bf67d Remove pointless #ifdef around internal #include.
diego
parents: 28051
diff changeset
28 #include "stream/stream.h"
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
29
33021
63beda39479c Cosmetic: Move supportive stuff at top of file.
ib
parents: 32984
diff changeset
30 // These are in support of the non-GUI files that interact with
63beda39479c Cosmetic: Move supportive stuff at top of file.
ib
parents: 32984
diff changeset
31 // the GUI and that only need to include interface.h for this.
63beda39479c Cosmetic: Move supportive stuff at top of file.
ib
parents: 32984
diff changeset
32 // ------------------------------------------------------------
32984
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
33 #include "cfg.h"
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
34
33021
63beda39479c Cosmetic: Move supportive stuff at top of file.
ib
parents: 32984
diff changeset
35 extern int use_gui; // this is defined in mplayer.c
63beda39479c Cosmetic: Move supportive stuff at top of file.
ib
parents: 32984
diff changeset
36 // ------------------------------------------------------------
63beda39479c Cosmetic: Move supportive stuff at top of file.
ib
parents: 32984
diff changeset
37
33466
45d8bfbd27bc Define "gmplayer" as symbolic constant.
ib
parents: 33309
diff changeset
38 #define GMPlayer "gmplayer"
45d8bfbd27bc Define "gmplayer" as symbolic constant.
ib
parents: 33309
diff changeset
39
33767
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
40 enum {
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
41 GUI_END_FILE,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
42 GUI_HANDLE_EVENTS,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
43 GUI_HANDLE_X_EVENT,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
44 GUI_PREPARE,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
45 GUI_REDRAW,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
46 GUI_RUN_COMMAND,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
47 GUI_SETUP_VIDEO_WINDOW,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
48 GUI_SET_AFILTER,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
49 GUI_SET_AUDIO,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
50 GUI_SET_CONTEXT,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
51 GUI_SET_FILE,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
52 GUI_SET_MIXER,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
53 GUI_SET_STATE,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
54 GUI_SET_STREAM,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
55 GUI_SET_VIDEO
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
56 };
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
57
33614
79743a5cf4f0 Rename the symbolic playback state constants.
ib
parents: 33611
diff changeset
58 #define GUI_STOP 0
79743a5cf4f0 Rename the symbolic playback state constants.
ib
parents: 33611
diff changeset
59 #define GUI_PLAY 1
79743a5cf4f0 Rename the symbolic playback state constants.
ib
parents: 33611
diff changeset
60 #define GUI_PAUSE 2
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
61
33767
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
62 enum {
33768
cee9987bc81d Remove guiExit().
ib
parents: 33767
diff changeset
63 MPLAYER_EXIT_GUI,
33767
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
64 MPLAYER_SET_AUTO_QUALITY,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
65 MPLAYER_SET_BRIGHTNESS,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
66 MPLAYER_SET_CONTRAST,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
67 MPLAYER_SET_EQUALIZER,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
68 MPLAYER_SET_EXTRA_STEREO,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
69 MPLAYER_SET_FONT_AUTOSCALE,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
70 MPLAYER_SET_FONT_BLUR,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
71 MPLAYER_SET_FONT_ENCODING,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
72 MPLAYER_SET_FONT_FACTOR,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
73 MPLAYER_SET_FONT_OSDSCALE,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
74 MPLAYER_SET_FONT_OUTLINE,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
75 MPLAYER_SET_FONT_TEXTSCALE,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
76 MPLAYER_SET_HUE,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
77 MPLAYER_SET_PANSCAN,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
78 MPLAYER_SET_SATURATION,
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
79 MPLAYER_SET_SUB_ENCODING
690c9b35f4d1 Change GUI and MPLAYER symbolic constants into enums.
ib
parents: 33766
diff changeset
80 };
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
81
32984
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
82 typedef struct {
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
83 int titles;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
84 int chapters;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
85 int angles;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
86 int current_chapter;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
87 int current_title;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
88 int current_angle;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
89 int nr_of_audio_channels;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
90 stream_language_t audio_streams[32];
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
91 int nr_of_subtitles;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
92 stream_language_t subtitles[32];
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
93 } guiDVDStruct;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
94
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
95 typedef struct {
33774
474ffcdcc6e7 Change guiInterface_t void pointer member declarations.
ib
parents: 33773
diff changeset
96 MPContext *mpcontext;
474ffcdcc6e7 Change guiInterface_t void pointer member declarations.
ib
parents: 33773
diff changeset
97 sh_video_t *sh_video;
474ffcdcc6e7 Change guiInterface_t void pointer member declarations.
ib
parents: 33773
diff changeset
98 af_stream_t *afilter;
32984
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
99
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
100 int DiskChanged;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
101 int NewPlay;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
102
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
103 #ifdef CONFIG_DVDREAD
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
104 guiDVDStruct DVD;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
105 int Title;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
106 int Angle;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
107 int Chapter;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
108 #endif
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
109
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
110 #ifdef CONFIG_VCD
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
111 int VCDTracks;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
112 #endif
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
113
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
114 int Playing;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
115 float Position;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
116
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
117 int MovieWidth;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
118 int MovieHeight;
33655
cbb7cfeb8c71 Rename guiInterface_t member NoWindow MovieWindow.
ib
parents: 33653
diff changeset
119 int MovieWindow;
32984
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
120
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
121 float Volume;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
122 float Balance;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
123
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
124 int Track;
33646
f3300b0c38a9 Rename guiInterface_t member AudioType AudioChannels.
ib
parents: 33614
diff changeset
125 int AudioChannels;
32984
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
126 int StreamType;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
127 int TimeSec;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
128 int LengthInSec;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
129
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
130 char *Filename;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
131 int FilenameChanged;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
132
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
133 char *Subtitlename;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
134
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
135 char *AudioFile;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
136 } guiInterface_t;
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
137
33555
c5a19bbeac2b Cosmetic: Rename some GUI variables and functions.
ib
parents: 33474
diff changeset
138 extern guiInterface_t guiInfo;
32984
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
139
33745
2d1babde7b29 Cosmetic: Separate interface functions.
ib
parents: 33744
diff changeset
140 /* MPlayer -> GUI */
2d1babde7b29 Cosmetic: Separate interface functions.
ib
parents: 33744
diff changeset
141
33791
8b0c78a85a8c Cosmetic: Change parameter names of gui() and mplayer().
ib
parents: 33790
diff changeset
142 int gui(int what, void *data);
32984
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
143 void guiDone(void);
eb831a979df7 Cosmetic: Format to MPlayer coding style.
ib
parents: 32978
diff changeset
144 void guiInit(void);
33764
498e3d5f223b Cosmetic: Order prototypes in interface.h.
ib
parents: 33763
diff changeset
145 int guiPlaylistAdd(play_tree_t *my_playtree, m_config_t *config);
33752
6cea6d268f97 Cosmetic: Rename the GUI playlist functions.
ib
parents: 33750
diff changeset
146 int guiPlaylistInitialize(play_tree_t *my_playtree, m_config_t *config, int enqueue);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
147
33746
23c804f4efbf Cosmetic: Separate interface functions.
ib
parents: 33745
diff changeset
148 /* GUI -> MPlayer */
23c804f4efbf Cosmetic: Separate interface functions.
ib
parents: 33745
diff changeset
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
03824cf8728d Cosmetic: Rename two functions that do MPlayer calls.
ib
parents: 33752
diff changeset
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
498e3d5f223b Cosmetic: Order prototypes in interface.h.
ib
parents: 33763
diff changeset
153 void gmp_msg(int mod, int lev, const char *format, ...);
33745
2d1babde7b29 Cosmetic: Separate interface functions.
ib
parents: 33744
diff changeset
154
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25607
diff changeset
155 #endif /* MPLAYER_GUI_INTERFACE_H */