~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to gui/interface.h

  • Committer: Gauvain Pocentek
  • Date: 2012-03-06 11:59:12 UTC
  • mfrom: (66.1.15 precise)
  • Revision ID: gauvain@pocentek.net-20120306115912-h9d6kt9j0l532oo5
* Merge from Ubuntu:
  - put back faac support
  - recommends apport-hooks-medibuntu
  - change Maintainer, Uploaders & Vcs-* fields.
* New upstream snapshot
* upload to unstable
* Build against external libmpeg2
* drop 51_FTBFS_arm.patch again
* no longer build depend on libcdparanoia-dev on the Hurd
* Fix FTBFS on the hurd.
  Thanks to Samuel Thibault <sthibault@debian.org> (Closes: #654974)
* Fix FTBFS on arm
* New upstream snapshot, Closes: #650339, #643621, #481807
* Imported Upstream version 1.0~rc4+svn34492
* Bump standards version
* Bump dependency on libav >= 4:0.8~, Closes: #653887
* Fix build-indep
* Build mplayer-gui again, Closes: #568514
* Drop debian/all-lang-config-mak.sh, no longer needed
* include .dfsg1 in version number
* remove get-orig-source target
* no longer prune compiler flags from the environment
* No longer advertise nor build 3fdx, mga and dxr3 backends,
  Closes: #496106, #442181, #533546
* beautify mplayer version identification string
* Brown paperbag upload.
* Next try to fix build failure on sparce after recent binutils change.
* Brown paperbag upload.
* Really fix build failure on sparc after recent binutils change.
* Properly set Replaces/Conflicts on mplayer2{,-dbg} to avoid
  file overwrite errors.
* Adjust versioning of mplayer listed in the mplayer-dbg's Depends field.
* Fix build failure on sparc after recent binutils change.
* Urgency medium bumped because of RC-level bugfix
  and speeding up x264 transition.
* Update to my @debian.org email.
* Upload to unstable
* Enable joystick support on Linux only, Closes: #638408
* Rebuild fixes toolchain issue on arm, Closes: #637077
* New upstream snapshot
* following the discussion started by Diego Biurrun <diego@biurrun.de>
  in debian-devel, I have prepared a new packaging of 'mplayer'
  (with code that comes from CVS)
* the upstream tar.bz cannot be distributed by Debian, since it contains
   CSS code; so I am repackaging it 
* I have tried my best to address all known issues:
  - the package contains the detailed Copyright made by Diego Biurrun 
  - the package does not contain CSS code, or  AFAIK other code on which 
     there is active patent enforcement
  - there is a script  debian/cvs-changelog.sh  that shows all changes
     done to files included in this source.
    This should comply with GPLv2 sec 2.a  (in spirit if not in letter)
    For this reason, the source code contains CVS directories.
* needs   make (>= 3.80) for 'html-chunked-$(1)' in DOCS/xml/Makefile

* some corrections, as suggested Diego Biurrun
  - binary codecs should go into /usr/lib/codecs (upstream default)
  - better template 'mplayer/install_codecs'
  - an empty 'font=' in mplayer.conf breaks mplayer: postinst corrected
* correction in 'mplayer/cfgnote'
* better mplayer.postinst and mplayer.config

* New upstream release
* better debian/copyright file
* do not ship a skin
* New upstream release
* changed DEB_BUILD_OPTIONS to DEB_BUILD_CONFIGURE ,
  DEB_BUILD_OPTIONS is used as in debian policy
* use gcc-3.4
* changed xlibs-dev to a long list of dependencies, for Debian/etch
* try to adhere to  http://www.mplayerhq.hu/DOCS/tech/binary-packaging.txt
  (see README.Debian for details)
* removed dependency on xlibmesa-dev, disabled opengl
* New upstream release
* Simon McVittie <hacks@pseudorandom.co.uk> wonderful work:
- Work around Debian bug #267442 (glibc's sys/uio.h and gcc's altivec.h have
  conflicting uses for __vector) by re-ordering #includes
- Fix potential symlink attack in ./configure
- Disable support for binary codecs on platforms for which those codecs
  aren't available; also disable the corresponding Debconf note when it's
  inappropriate
- Changed Build-Depends: so it works in pbuilder
- Explicitly build-depend on libjpeg62-dev, libfontconfig1-dev,
  libungif4-dev 
- Tweak debian/rules to avoid certain errors being ignored
- Use --language=all
* provide a target  'debian/rules get-orig-source' 
  that recreates the orig.tar.gz ; then use the above orig.tar.gz
* rewrote some parts of debian/rules
* don't clean and recompile docs if upstream ships them
* mplayer-doc was shipping too much stuff
* translated man pages where not installed properly
* compile with libdv4-dev
* correct README.Debian
* Forgot build-dep on libtheora
* Must not depend on libxvidcore
* New upstream release
* new release.
* rc1 to become 0.90
* new pre-release
* new pre-release
* gtk bug fixed.
* new release.
* version bumped
* 0.60 pre2 release
* 0.60 pre-release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#define MPLAYER_GUI_INTERFACE_H
21
21
 
22
22
#include "config.h"
 
23
#include "libaf/af.h"
 
24
#include "libmpdemux/stheader.h"
23
25
#include "m_config.h"
24
26
#include "mp_core.h"
25
27
#include "playtree.h"
29
31
// the GUI and that only need to include interface.h for this.
30
32
// ------------------------------------------------------------
31
33
#include "cfg.h"
32
 
#include "ui/actions.h"
33
34
 
34
35
extern int use_gui;             // this is defined in mplayer.c
35
36
// ------------------------------------------------------------
36
37
 
37
38
#define GMPlayer "gmplayer"
38
39
 
39
 
#define guiXEvent          0
40
 
#define guiSetState        1
41
 
#define guiIEvent          2
42
 
#define guiSetDVD          3
43
 
#define guiSetFileName     4
44
 
#define guiSetAudioOnly    6
45
 
#define guiReDrawSubWindow 7
46
 
#define guiSetShVideo      8
47
 
#define guiSetStream       9
48
 
#define guiReDraw          10
49
 
#define guiSetVolume       11
50
 
#define guiSetDefaults     12
51
 
#define guiSetValues       13
52
 
#define guiSetFileFormat   14
53
 
#define guiSetDemuxer      15
54
 
#define guiSetParameters   16
55
 
#define guiSetAfilter      17
56
 
#define guiSetContext      18
 
40
/// gui() instructions
 
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_RUN_MESSAGE,
 
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
};
57
58
 
 
59
//@{
 
60
/// Playing state
58
61
#define GUI_STOP  0
59
62
#define GUI_PLAY  1
60
63
#define GUI_PAUSE 2
61
 
 
62
 
#define guiDVD       1
63
 
#define guiVCD       2
64
 
#define guiFilenames 4
65
 
#define guiALL       0xffffffff
66
 
 
67
 
#define gtkSetContrast      0
68
 
#define gtkSetBrightness    1
69
 
#define gtkSetHue           2
70
 
#define gtkSetSaturation    3
71
 
#define gtkSetEqualizer     4
72
 
#define gtkAddPlItem        5
73
 
#define gtkGetNextPlItem    6
74
 
#define gtkGetPrevPlItem    7
75
 
#define gtkGetCurrPlItem    8
76
 
#define gtkDelPl            9
77
 
#define gtkSetExtraStereo   10
78
 
#define gtkSetPanscan       11
79
 
#define gtkSetFontFactor    12
80
 
#define gtkSetAutoq         13
81
 
#define gtkClearStruct      14
82
 
#define gtkAddURLItem       15
83
 
#define gtkSetFontOutLine   16
84
 
#define gtkSetFontBlur      17
85
 
#define gtkSetFontTextScale 18
86
 
#define gtkSetFontOSDScale  19
87
 
#define gtkSetFontEncoding  20
88
 
#define gtkSetFontAutoScale 21
89
 
#define gtkSetSubEncoding   22
90
 
#define gtkDelCurrPlItem    23
91
 
#define gtkInsertPlItem     24
92
 
#define gtkSetCurrPlItem    25
93
 
 
94
 
#define fsPersistant_MaxPos 5
95
 
 
96
 
#define guiSetFilename(s, n) \
97
 
    { \
98
 
        free(s); \
99
 
        s = gstrdup(n); \
100
 
    }
101
 
 
102
 
#define guiSetDF(s, d, n) \
103
 
    { \
104
 
        free(s); \
105
 
        s = malloc(strlen(d) + strlen(n) + 5); \
106
 
        sprintf(s, "%s/%s", d, n); \
107
 
    }
108
 
 
109
 
typedef struct {
110
 
    int x;
111
 
    int y;
112
 
    int width;
113
 
    int height;
114
 
} guiResizeStruct;
115
 
 
116
 
typedef struct {
117
 
    int signal;
118
 
    char module[512];
119
 
} guiUnknownErrorStruct;
120
 
 
121
 
typedef struct {
122
 
    int seek;
123
 
    int format;
124
 
    int width;
125
 
    int height;
126
 
    char codecdll[128];
127
 
} guiVideoStruct;
128
 
 
129
 
#ifdef CONFIG_DVDREAD
130
 
typedef struct {
131
 
    int titles;
132
 
    int chapters;
133
 
    int angles;
134
 
    int current_chapter;
135
 
    int current_title;
136
 
    int current_angle;
137
 
    int nr_of_audio_channels;
138
 
    stream_language_t audio_streams[32];
139
 
    int nr_of_subtitles;
140
 
    stream_language_t subtitles[32];
141
 
} guiDVDStruct;
142
 
#endif
143
 
 
144
 
typedef struct {
145
 
    int message;
146
 
    guiResizeStruct resize;
147
 
    guiVideoStruct videodata;
148
 
    guiUnknownErrorStruct error;
149
 
 
150
 
    struct MPContext *mpcontext;
151
 
    void *sh_video;
152
 
    void *afilter;
153
 
    void *demuxer;
154
 
    void *event_struct;
155
 
 
156
 
    int DiskChanged;
157
 
    int NewPlay;
158
 
 
159
 
#ifdef CONFIG_DVDREAD
160
 
    guiDVDStruct DVD;
161
 
    int Title;
 
64
//@}
 
65
 
 
66
//@{
 
67
/// NewPlay reason
 
68
#define GUI_FILE_SAME 1
 
69
#define GUI_FILE_NEW  2
 
70
//@}
 
71
 
 
72
/// mplayer() instructions
 
73
enum {
 
74
    MPLAYER_EXIT_GUI,
 
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
};
 
92
 
 
93
typedef struct {
 
94
    MPContext *mpcontext;
 
95
    sh_video_t *sh_video;
 
96
    af_stream_t *afilter;
 
97
 
 
98
    int VideoWindow;
 
99
    int VideoWidth;
 
100
    int VideoHeight;
 
101
 
 
102
    int StreamType;
 
103
    int AudioChannels;
 
104
 
 
105
#ifdef CONFIG_DVDREAD
 
106
    int AudioStreams;
 
107
    stream_language_t AudioStream[32];
 
108
 
 
109
    int Subtitles;
 
110
    stream_language_t Subtitle[32];
 
111
#endif
 
112
 
 
113
    char *Filename;           // public, read access by MPlayer
 
114
    char *AudioFilename;
 
115
    char *SubtitleFilename;
 
116
 
 
117
#if defined(CONFIG_VCD) || defined(CONFIG_DVDREAD)
 
118
    int Tracks;
 
119
#endif
 
120
 
 
121
    int Track;                // public, read access by MPlayer
 
122
 
 
123
#ifdef CONFIG_DVDREAD
 
124
    int Chapters;
 
125
    int Chapter;              // public, write access by MPlayer
 
126
    int Angles;
162
127
    int Angle;
163
 
    int Chapter;
164
 
#endif
165
 
 
166
 
#ifdef CONFIG_VCD
167
 
    int VCDTracks;
168
 
#endif
169
 
 
170
 
    int Playing;
171
 
    float Position;
172
 
 
173
 
    int MovieWidth;
174
 
    int MovieHeight;
175
 
    int NoWindow;
 
128
#endif
 
129
 
 
130
    int Playing;              // public, read access by MPlayer
 
131
 
 
132
    int RunningTime;          // public, write access by MPlayer
 
133
    int ElapsedTime;          // public, write access by MPlayer
 
134
    float Position;           // public, write access by MPlayer
176
135
 
177
136
    float Volume;
178
137
    float Balance;
179
138
 
180
 
    int Track;
181
 
    int AudioType;
182
 
    int StreamType;
183
 
    int AudioOnly;
184
 
    int TimeSec;
185
 
    int LengthInSec;
186
 
    int FrameDrop;
187
 
    int FileFormat;
188
 
    float FPS;
189
 
 
190
 
    char *Filename;
191
 
    int FilenameChanged;
192
 
 
193
 
    char *Subtitlename;
194
 
    int SubtitleChanged;
195
 
 
196
 
    char *Othername;
197
 
    int OtherChanged;
198
 
 
199
 
    char *AudioFile;
200
 
    int AudioFileChanged;
201
 
 
202
 
    int SkinChange;
 
139
    int NewPlay;              // public, read access by MPlayer
203
140
} guiInterface_t;
204
141
 
205
 
typedef struct plItem {
206
 
    struct plItem *prev, *next;
207
 
    char *path;
208
 
    char *name;
209
 
} plItem;
210
 
 
211
 
typedef struct urlItem {
212
 
    struct urlItem *next;
213
 
    char *url;
214
 
} urlItem;
215
 
 
216
142
extern guiInterface_t guiInfo;
217
143
 
218
 
extern int guiWinID;
219
 
 
220
 
extern char *skinName;
221
 
extern char *skinDirInHome;
222
 
extern char *skinMPlayerDir;
223
 
 
224
 
extern plItem *plList;
225
 
extern plItem *plCurrent;
226
 
extern plItem *plLastPlayed;
227
 
 
228
 
extern urlItem *URLList;
229
 
 
230
 
extern char *fsHistory[fsPersistant_MaxPos];
231
 
 
232
 
extern float gtkEquChannels[6][10];
233
 
 
234
 
void gaddlist(char ***list, const char *entry);
235
 
void gfree(void **p);
236
 
void gmp_msg(int mod, int lev, const char *format, ...);
237
 
char *gstrchr(char *str, int c);
238
 
int gstrcmp(const char *a, const char *b);
239
 
char *gstrdup(const char *str);
240
 
void *gtkSet(int cmd, float fparam, void *vparam);
 
144
/// @name MPlayer -> GUI
 
145
//@{
 
146
int gui(int what, void *data);
241
147
void guiDone(void);
242
 
void guiEventHandling(void);
243
 
void guiExit(enum exit_reason how);
244
 
int guiGetEvent(int type, void *arg);
245
148
void guiInit(void);
246
 
void guiLoadFont(void);
247
 
void guiLoadSubtitle(char *name);
248
 
int import_initial_playtree_into_gui(play_tree_t *my_playtree, m_config_t *config, int enqueue);
249
 
int import_playtree_playlist_into_gui(play_tree_t *my_playtree, m_config_t *config);
 
149
int guiPlaylistAdd(play_tree_t *my_playtree, m_config_t *config);
 
150
int guiPlaylistInitialize(play_tree_t *my_playtree, m_config_t *config, int enqueue);
 
151
//@}
 
152
 
 
153
/// @name GUI -> MPlayer
 
154
//@{
 
155
void mplayer(int what, float value, void *data);
 
156
void mplayerLoadFont(void);
 
157
void mplayerLoadSubtitle(const char *name);
 
158
void gmp_msg(int mod, int lev, const char *format, ...);
 
159
//@}
250
160
 
251
161
#endif /* MPLAYER_GUI_INTERFACE_H */