annotate mp_core.h @ 23764:cd8985396f48

Let us not pretend to be checking for devfs when we are not.
author diego
date Sat, 14 Jul 2007 15:16:34 +0000
parents 11abe5f3dcaa
children ce7bb9afa58a
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;
23726
11abe5f3dcaa Move loop_times into mpctx.
albeu
parents: 22488
diff changeset
54 int loop_times;
22280
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
55
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
56 stream_t *stream;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
57 demuxer_t *demuxer;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
58 sh_audio_t *sh_audio;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
59 sh_video_t *sh_video;
22297
3340e52ad814 Move some related variables together & add a comment
uau
parents: 22288
diff changeset
60 demux_stream_t *d_audio;
22280
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
61 demux_stream_t *d_video;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
62 demux_stream_t *d_sub;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
63 mixer_t mixer;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
64 vo_functions_t *video_out;
22288
da8ba4c0fc57 Cleanup, move "global" state from the frame_time_remaining mainloop
uau
parents: 22280
diff changeset
65 // 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
66 // 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
67 // struct.
da8ba4c0fc57 Cleanup, move "global" state from the frame_time_remaining mainloop
uau
parents: 22280
diff changeset
68 int num_buffered_frames;
22280
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
69
22488
b6aa3eedf49b Move the sh_audio->delay field to mpctx->delay.
uau
parents: 22297
diff changeset
70 // AV sync: the next frame should be shown when the audio out has this
b6aa3eedf49b Move the sh_audio->delay field to mpctx->delay.
uau
parents: 22297
diff changeset
71 // much (in seconds) buffered data left. Increased when more data is
b6aa3eedf49b Move the sh_audio->delay field to mpctx->delay.
uau
parents: 22297
diff changeset
72 // written to the ao, decreased when moving to the next frame.
b6aa3eedf49b Move the sh_audio->delay field to mpctx->delay.
uau
parents: 22297
diff changeset
73 // In the audio-only case used as a timer since the last seek
b6aa3eedf49b Move the sh_audio->delay field to mpctx->delay.
uau
parents: 22297
diff changeset
74 // by the audio CPU usage meter.
b6aa3eedf49b Move the sh_audio->delay field to mpctx->delay.
uau
parents: 22297
diff changeset
75 double delay;
b6aa3eedf49b Move the sh_audio->delay field to mpctx->delay.
uau
parents: 22297
diff changeset
76
22297
3340e52ad814 Move some related variables together & add a comment
uau
parents: 22288
diff changeset
77 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
78 // 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
79 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
80 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
81
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
82 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
83 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
84 int set_of_sub_pos;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
85 int set_of_sub_size;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
86 int global_sub_indices[SUB_SOURCES];
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
87 #ifdef USE_ASS
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
88 // 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
89 // 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
90 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
91 #endif
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
92 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
93
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
94 int file_format;
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 #ifdef HAS_DVBIN_SUPPORT
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
97 int last_dvb_step;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
98 int dvbin_reopen;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
99 #endif
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
100
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
101 int was_paused;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
102 } MPContext;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
103
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
104
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
105 // 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
106 extern int abs_seek_pos;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
107 extern float rel_seek_secs;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
108 extern FILE *edl_fd;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
109 extern int file_filter;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
110 // These appear in options list
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
111 extern float playback_speed;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
112 extern int osd_duration;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
113 extern int term_osd;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
114 extern int fixed_vo;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
115 extern int ass_enabled;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
116 extern int fixed_vo;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
117 extern int forced_subs_only;
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 // 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
120 extern int vo_gamma_gamma;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
121 extern int vo_gamma_brightness;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
122 extern int vo_gamma_contrast;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
123 extern int vo_gamma_saturation;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
124 extern int vo_gamma_hue;
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
125
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
126
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
127
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
128 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
129 void uninit_player(unsigned int mask);
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
130 void reinit_audio_chain(void);
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
131 void init_vo_spudec(void);
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
132 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
133 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
134 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
135 ao_functions_t *audio_out);
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
136 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
137 char *get_path(const char *filename);
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
138 void rm_osd_msg(int id);
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
139 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
140 void mplayer_put_key(int code);
a5e5b0c45c03 Split command/property handling from mplayer.c to a new file command.c.
uau
parents:
diff changeset
141 int reinit_video_chain(void);