annotate mp_core.h @ 22297:3340e52ad814

Move some related variables together & add a comment
author uau
date Thu, 22 Feb 2007 20:44:48 +0000
parents da8ba4c0fc57
children b6aa3eedf49b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22280
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
1 // definitions used internally by the core player code
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
2
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
3 #define INITED_VO 1
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
4 #define INITED_AO 2
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
5 #define INITED_GUI 4
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
6 #define INITED_GETCH2 8
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
7 #define INITED_SPUDEC 32
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
8 #define INITED_STREAM 64
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
9 #define INITED_INPUT 128
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
10 #define INITED_VOBSUB 256
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
11 #define INITED_DEMUXER 512
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
12 #define INITED_ACODEC 1024
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
13 #define INITED_VCODEC 2048
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
14 #define INITED_ALL 0xFFFF
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
15
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
16
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
17 #define SUB_SOURCE_SUBS 0
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
18 #define SUB_SOURCE_VOBSUB 1
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
19 #define SUB_SOURCE_DEMUX 2
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
20 #define SUB_SOURCES 3
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
21
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
22
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
23 #define PT_NEXT_ENTRY 1
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
24 #define PT_PREV_ENTRY -1
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
25 #define PT_NEXT_SRC 2
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
26 #define PT_PREV_SRC -2
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
27 #define PT_UP_NEXT 3
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
28 #define PT_UP_PREV -3
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
29
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
30
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
31 #define OSD_MSG_TV_CHANNEL 0
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
32 #define OSD_MSG_TEXT 1
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
33 #define OSD_MSG_SUB_DELAY 2
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
34 #define OSD_MSG_SPEED 3
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
35 #define OSD_MSG_OSD_STATUS 4
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
36 #define OSD_MSG_BAR 5
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
37 #define OSD_MSG_PAUSE 6
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
38 #define OSD_MSG_RADIO_CHANNEL 7
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
39 /// Base id for messages generated from the commmand to property bridge.
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
40 #define OSD_MSG_PROPERTY 0x100
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
41
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
42 #define MAX_OSD_LEVEL 3
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
43 #define MAX_TERM_OSD_LEVEL 1
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
44
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
45
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
46 typedef struct MPContext {
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
47 int osd_show_percentage;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
48 int osd_function;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
49 ao_functions_t *audio_out;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
50 play_tree_t *playtree;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
51 play_tree_iter_t *playtree_iter;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
52 int eof;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
53 int play_tree_step;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
54
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
55 stream_t *stream;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
56 demuxer_t *demuxer;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
57 sh_audio_t *sh_audio;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
58 sh_video_t *sh_video;
22297
3340e52ad814 Move some related variables together & add a comment
uau
parents: 22288
diff changeset
59 demux_stream_t *d_audio;
22280
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
60 demux_stream_t *d_video;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
61 demux_stream_t *d_sub;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
62 mixer_t mixer;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
63 vo_functions_t *video_out;
22288
da8ba4c0fc57 Cleanup, move "global" state from the frame_time_remaining mainloop
uau
parents: 22280
diff changeset
64 // Frames buffered in the vo ready to flip. Currently always 0 or 1.
da8ba4c0fc57 Cleanup, move "global" state from the frame_time_remaining mainloop
uau
parents: 22280
diff changeset
65 // This is really a vo variable but currently there's no suitable vo
da8ba4c0fc57 Cleanup, move "global" state from the frame_time_remaining mainloop
uau
parents: 22280
diff changeset
66 // struct.
da8ba4c0fc57 Cleanup, move "global" state from the frame_time_remaining mainloop
uau
parents: 22280
diff changeset
67 int num_buffered_frames;
22280
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
68
22297
3340e52ad814 Move some related variables together & add a comment
uau
parents: 22288
diff changeset
69 float begin_skip; ///< start time of the current skip while on edlout mode
3340e52ad814 Move some related variables together & add a comment
uau
parents: 22288
diff changeset
70 // audio is muted if either EDL or user activates mute
22280
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
71 short edl_muted; ///< Stores whether EDL is currently in muted mode.
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
72 short user_muted; ///< Stores whether user wanted muted mode.
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
73
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
74 int global_sub_size; // this encompasses all subtitle sources
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
75 int global_sub_pos; // this encompasses all subtitle sources
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
76 int set_of_sub_pos;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
77 int set_of_sub_size;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
78 int global_sub_indices[SUB_SOURCES];
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
79 #ifdef USE_ASS
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
80 // set_of_ass_tracks[i] contains subtitles from set_of_subtitles[i]
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
81 // parsed by libass or NULL if format unsupported
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
82 ass_track_t* set_of_ass_tracks[MAX_SUBTITLE_FILES];
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
83 #endif
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
84 sub_data* set_of_subtitles[MAX_SUBTITLE_FILES];
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
85
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
86 int file_format;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
87
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
88 #ifdef HAS_DVBIN_SUPPORT
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
89 int last_dvb_step;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
90 int dvbin_reopen;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
91 #endif
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
92
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
93 int was_paused;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
94 } MPContext;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
95
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
96
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
97 // Most of these should not be globals
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
98 extern int abs_seek_pos;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
99 extern float rel_seek_secs;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
100 extern FILE *edl_fd;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
101 extern int file_filter;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
102 // These appear in options list
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
103 extern float playback_speed;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
104 extern int osd_duration;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
105 extern int term_osd;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
106 extern int fixed_vo;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
107 extern int ass_enabled;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
108 extern int fixed_vo;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
109 extern int forced_subs_only;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
110
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
111 // These were listed as externs in mplayer.c, should be in some other header
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
112 extern int vo_gamma_gamma;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
113 extern int vo_gamma_brightness;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
114 extern int vo_gamma_contrast;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
115 extern int vo_gamma_saturation;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
116 extern int vo_gamma_hue;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
117
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
118
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
119
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
120 int build_afilter_chain(sh_audio_t *sh_audio, ao_data_t *ao_data);
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
121 void uninit_player(unsigned int mask);
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
122 void reinit_audio_chain(void);
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
123 void init_vo_spudec(void);
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
124 void set_osd_bar(int type,const char* name,double min,double max,double val);
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
125 void set_osd_msg(int id, int level, int time, const char* fmt, ...);
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
126 double playing_audio_pts(sh_audio_t *sh_audio, demux_stream_t *d_audio,
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
127 ao_functions_t *audio_out);
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
128 void exit_player_with_rc(const char* how, int rc);
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
129 char *get_path(const char *filename);
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
130 void rm_osd_msg(int id);
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
131 void add_subtitles(char *filename, float fps, int silent);
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
132 void mplayer_put_key(int code);
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
133 int reinit_video_chain(void);