Mercurial > mplayer.hg
annotate gui/interface.h @ 35621:5bd6866e8566
Support FFmpeg 012v decoder.
author | cehoyos |
---|---|
date | Sun, 06 Jan 2013 18:25:55 +0000 |
parents | e27855a45128 |
children | c667e34fb941 |
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 |
33774
474ffcdcc6e7
Change guiInterface_t void pointer member declarations.
ib
parents:
33773
diff
changeset
|
22 #include "libaf/af.h" |
474ffcdcc6e7
Change guiInterface_t void pointer member declarations.
ib
parents:
33773
diff
changeset
|
23 #include "libmpdemux/stheader.h" |
30533
e3e329bc727a
Avoid forward declarations for import_initial_playtree_into_gui() and
diego
parents:
29263
diff
changeset
|
24 #include "m_config.h" |
33774
474ffcdcc6e7
Change guiInterface_t void pointer member declarations.
ib
parents:
33773
diff
changeset
|
25 #include "mp_core.h" |
30533
e3e329bc727a
Avoid forward declarations for import_initial_playtree_into_gui() and
diego
parents:
29263
diff
changeset
|
26 #include "playtree.h" |
29149 | 27 #include "stream/stream.h" |
23077 | 28 |
33021 | 29 // These are in support of the non-GUI files that interact with |
30 // the GUI and that only need to include interface.h for this. | |
31 // ------------------------------------------------------------ | |
35525 | 32 #include "app/cfg.h" |
23077 | 33 |
33021 | 34 extern int use_gui; // this is defined in mplayer.c |
35 // ------------------------------------------------------------ | |
36 | |
33466 | 37 #define GMPlayer "gmplayer" |
38 | |
33980 | 39 /// gui() instructions |
33767 | 40 enum { |
41 GUI_END_FILE, | |
42 GUI_HANDLE_EVENTS, | |
43 GUI_HANDLE_X_EVENT, | |
44 GUI_PREPARE, | |
45 GUI_REDRAW, | |
46 GUI_RUN_COMMAND, | |
34339 | 47 GUI_RUN_MESSAGE, |
33767 | 48 GUI_SETUP_VIDEO_WINDOW, |
49 GUI_SET_AFILTER, | |
50 GUI_SET_AUDIO, | |
51 GUI_SET_CONTEXT, | |
52 GUI_SET_MIXER, | |
53 GUI_SET_STATE, | |
54 GUI_SET_STREAM, | |
55 GUI_SET_VIDEO | |
56 }; | |
23077 | 57 |
35510 | 58 /// guiPlaylist() instructions |
59 enum { | |
60 GUI_PLAYLIST_INIT, | |
61 GUI_PLAYLIST_ADD | |
62 }; | |
63 | |
33980 | 64 //@{ |
65 /// Playing state | |
33614 | 66 #define GUI_STOP 0 |
67 #define GUI_PLAY 1 | |
68 #define GUI_PAUSE 2 | |
33980 | 69 //@} |
23077 | 70 |
33980 | 71 //@{ |
72 /// NewPlay reason | |
33890 | 73 #define GUI_FILE_SAME 1 |
74 #define GUI_FILE_NEW 2 | |
33980 | 75 //@} |
33890 | 76 |
33980 | 77 /// mplayer() instructions |
33767 | 78 enum { |
33768 | 79 MPLAYER_EXIT_GUI, |
33767 | 80 MPLAYER_SET_AUTO_QUALITY, |
81 MPLAYER_SET_BRIGHTNESS, | |
82 MPLAYER_SET_CONTRAST, | |
83 MPLAYER_SET_EQUALIZER, | |
84 MPLAYER_SET_EXTRA_STEREO, | |
85 MPLAYER_SET_FONT_AUTOSCALE, | |
86 MPLAYER_SET_FONT_BLUR, | |
87 MPLAYER_SET_FONT_ENCODING, | |
88 MPLAYER_SET_FONT_FACTOR, | |
89 MPLAYER_SET_FONT_OSDSCALE, | |
90 MPLAYER_SET_FONT_OUTLINE, | |
91 MPLAYER_SET_FONT_TEXTSCALE, | |
92 MPLAYER_SET_HUE, | |
93 MPLAYER_SET_PANSCAN, | |
94 MPLAYER_SET_SATURATION, | |
95 MPLAYER_SET_SUB_ENCODING | |
96 }; | |
23077 | 97 |
32984 | 98 typedef struct { |
33774
474ffcdcc6e7
Change guiInterface_t void pointer member declarations.
ib
parents:
33773
diff
changeset
|
99 MPContext *mpcontext; |
474ffcdcc6e7
Change guiInterface_t void pointer member declarations.
ib
parents:
33773
diff
changeset
|
100 sh_video_t *sh_video; |
474ffcdcc6e7
Change guiInterface_t void pointer member declarations.
ib
parents:
33773
diff
changeset
|
101 af_stream_t *afilter; |
32984 | 102 |
33944 | 103 int VideoWindow; |
33901 | 104 int VideoWidth; |
105 int VideoHeight; | |
32984 | 106 |
35468
047fc4746236
Cosmetic: Adjust indent and move guiInfo member CodecName in structure.
ib
parents:
35462
diff
changeset
|
107 char *CodecName; |
047fc4746236
Cosmetic: Adjust indent and move guiInfo member CodecName in structure.
ib
parents:
35462
diff
changeset
|
108 |
34076 | 109 int StreamType; |
33900 | 110 int AudioChannels; |
111 | |
33902 | 112 int AudioStreams; |
113 stream_language_t AudioStream[32]; | |
114 | |
115 int Subtitles; | |
116 stream_language_t Subtitle[32]; | |
117 | |
33900 | 118 char *Filename; // public, read access by MPlayer |
119 char *AudioFilename; | |
120 char *SubtitleFilename; | |
32984 | 121 |
33876
4789b8eed97e
Get rid of a bunch of needless or redundant guiInfo members.
ib
parents:
33791
diff
changeset
|
122 int Tracks; |
33900 | 123 int Track; // public, read access by MPlayer |
124 int Chapters; | |
125 int Chapter; // public, write access by MPlayer | |
126 int Angles; | |
127 int Angle; | |
128 | |
129 int Playing; // public, read access by MPlayer | |
130 | |
131 int RunningTime; // public, write access by MPlayer | |
132 int ElapsedTime; // public, write access by MPlayer | |
133 float Position; // public, write access by MPlayer | |
32984 | 134 |
135 float Volume; | |
136 float Balance; | |
137 | |
33900 | 138 int NewPlay; // public, read access by MPlayer |
35430
2d55540614a9
Move uiProcessNextInPlaylist to the guiInfo structure.
ib
parents:
35391
diff
changeset
|
139 int PlaylistNext; |
32984 | 140 } guiInterface_t; |
141 | |
33555 | 142 extern guiInterface_t guiInfo; |
32984 | 143 |
33980 | 144 /// @name MPlayer -> GUI |
145 //@{ | |
33791
8b0c78a85a8c
Cosmetic: Change parameter names of gui() and mplayer().
ib
parents:
33790
diff
changeset
|
146 int gui(int what, void *data); |
32984 | 147 void guiDone(void); |
148 void guiInit(void); | |
35512 | 149 int guiPlaylist(int what, play_tree_t *playtree, m_config_t *config, int enqueue); |
33980 | 150 //@} |
23077 | 151 |
33980 | 152 /// @name GUI -> MPlayer |
153 //@{ | |
33791
8b0c78a85a8c
Cosmetic: Change parameter names of gui() and mplayer().
ib
parents:
33790
diff
changeset
|
154 void mplayer(int what, float value, void *data); |
33763 | 155 void mplayerLoadFont(void); |
33790
ab6d06f5b98b
Add const to some string pointer arguments that will not be modified.
ib
parents:
33776
diff
changeset
|
156 void mplayerLoadSubtitle(const char *name); |
33764 | 157 void gmp_msg(int mod, int lev, const char *format, ...); |
33980 | 158 //@} |
33745 | 159 |
26029 | 160 #endif /* MPLAYER_GUI_INTERFACE_H */ |