summaryrefslogtreecommitdiffstats
path: root/mpvcore
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-10-30 21:38:30 +0100
committerwm4 <wm4@nowhere>2013-10-30 22:19:31 +0100
commitfdd1b8cac13b7504e11db7e63f20d86e0f2e1cb2 (patch)
tree1d8bf408c799ddb2ecf72313afe6eb752039b530 /mpvcore
parenta17b5364ea41cddeaad74031846272d0efbb672e (diff)
downloadmpv-fdd1b8cac13b7504e11db7e63f20d86e0f2e1cb2.tar.bz2
mpv-fdd1b8cac13b7504e11db7e63f20d86e0f2e1cb2.tar.xz
mp_core: sort function prototypes by source file
I considered making a header file for each .c file, but decided against it. Asking around, not making separate headers was deemed acceptable. In the end, all of these depend on MPContext and store state inside of it, so separate headers aren't all that useful anyway.
Diffstat (limited to 'mpvcore')
-rw-r--r--mpvcore/player/mp_core.h126
1 files changed, 68 insertions, 58 deletions
diff --git a/mpvcore/player/mp_core.h b/mpvcore/player/mp_core.h
index a850123ad6..d5b1bb2995 100644
--- a/mpvcore/player/mp_core.h
+++ b/mpvcore/player/mp_core.h
@@ -301,19 +301,65 @@ typedef struct MPContext {
struct lua_ctx *lua_ctx;
} MPContext;
+// audio.c
+void reinit_audio_chain(struct MPContext *mpctx);
+int reinit_audio_filters(struct MPContext *mpctx);
+double playing_audio_pts(struct MPContext *mpctx);
+int fill_audio_out_buffers(struct MPContext *mpctx, double endpts);
+double written_audio_pts(struct MPContext *mpctx);
-// should not be global
-extern FILE *edl_fd;
-// These appear in options list
-extern int forced_subs_only;
+// configfiles.c
+bool mp_parse_cfgfiles(struct MPContext *mpctx);
+char *mp_get_playback_resume_config_filename(const char *fname,
+ struct MPOpts *opts);
+void mp_load_per_protocol_config(struct m_config *conf, const char * const file);
+void mp_load_per_extension_config(struct m_config *conf, const char * const file);
+void mp_load_per_output_config(struct m_config *conf, char *cfg, char *out);
+void mp_load_per_file_config(struct m_config *conf, const char * const file,
+ bool search_file_dir);
+void mp_load_playback_resume(struct m_config *conf, const char *file);
+void mp_write_watch_later_conf(struct MPContext *mpctx);
+struct playlist_entry *mp_resume_playlist(struct playlist *playlist,
+ struct MPOpts *opts);
+// loadfile.c
void uninit_player(struct MPContext *mpctx, unsigned int mask);
-void reinit_audio_chain(struct MPContext *mpctx);
-double playing_audio_pts(struct MPContext *mpctx);
struct track *mp_add_subtitles(struct MPContext *mpctx, char *filename);
-int reinit_video_chain(struct MPContext *mpctx);
-int reinit_video_filters(struct MPContext *mpctx);
-int reinit_audio_filters(struct MPContext *mpctx);
+void mp_switch_track(struct MPContext *mpctx, enum stream_type type,
+ struct track *track);
+struct track *mp_track_by_tid(struct MPContext *mpctx, enum stream_type type,
+ int tid);
+bool timeline_set_part(struct MPContext *mpctx, int i, bool force);
+double timeline_set_from_time(struct MPContext *mpctx, double pts, bool *need_reset);
+void init_demux_stream(struct MPContext *mpctx, enum stream_type type);
+void cleanup_demux_stream(struct MPContext *mpctx, enum stream_type type);
+void add_demuxer_tracks(struct MPContext *mpctx, struct demuxer *demuxer);
+bool mp_remove_track(struct MPContext *mpctx, struct track *track);
+struct playlist_entry *mp_next_file(struct MPContext *mpctx, int direction,
+ bool force);
+void mp_set_playlist_entry(struct MPContext *mpctx, struct playlist_entry *e);
+void mp_play_files(struct MPContext *mpctx);
+
+// main.c
+void mp_print_version(int always);
+
+// misc.c
+double get_start_time(struct MPContext *mpctx);
+double get_main_demux_pts(struct MPContext *mpctx);
+double rel_time_to_abs(struct MPContext *mpctx, struct m_rel_time t,
+ double fallback_time);
+double get_play_end_pts(struct MPContext *mpctx);
+double get_relative_time(struct MPContext *mpctx);
+int mp_get_cache_percent(struct MPContext *mpctx);
+bool mp_get_cache_idle(struct MPContext *mpctx);
+void update_vo_window_title(struct MPContext *mpctx);
+void stream_dump(struct MPContext *mpctx);
+
+// osd.c
+void write_status_line(struct MPContext *mpctx, const char *line);
+void print_status(struct MPContext *mpctx);
+
+// playloop.c
void pause_player(struct MPContext *mpctx);
void unpause_player(struct MPContext *mpctx);
void add_step_frame(struct MPContext *mpctx, int dir);
@@ -321,7 +367,6 @@ void queue_seek(struct MPContext *mpctx, enum seek_type type, double amount,
int exact);
bool mp_seek_chapter(struct MPContext *mpctx, int chapter);
double get_time_length(struct MPContext *mpctx);
-double get_start_time(struct MPContext *mpctx);
double get_current_time(struct MPContext *mpctx);
int get_percent_pos(struct MPContext *mpctx);
double get_current_pos_ratio(struct MPContext *mpctx, bool use_range);
@@ -330,60 +375,18 @@ char *chapter_display_name(struct MPContext *mpctx, int chapter);
char *chapter_name(struct MPContext *mpctx, int chapter);
double chapter_start_time(struct MPContext *mpctx, int chapter);
int get_chapter_count(struct MPContext *mpctx);
-void mp_switch_track(struct MPContext *mpctx, enum stream_type type,
- struct track *track);
-struct track *mp_track_by_tid(struct MPContext *mpctx, enum stream_type type,
- int tid);
-bool mp_remove_track(struct MPContext *mpctx, struct track *track);
-struct playlist_entry *mp_next_file(struct MPContext *mpctx, int direction,
- bool force);
-int mp_get_cache_percent(struct MPContext *mpctx);
-bool mp_get_cache_idle(struct MPContext *mpctx);
-void mp_write_watch_later_conf(struct MPContext *mpctx);
-void mp_set_playlist_entry(struct MPContext *mpctx, struct playlist_entry *e);
-struct playlist_entry *mp_resume_playlist(struct playlist *playlist,
- struct MPOpts *opts);
-void mp_force_video_refresh(struct MPContext *mpctx);
-void mp_play_files(struct MPContext *mpctx);
-bool mp_parse_cfgfiles(struct MPContext *mpctx);
-char *mp_get_playback_resume_config_filename(const char *fname,
- struct MPOpts *opts);
-void mp_load_per_protocol_config(struct m_config *conf, const char * const file);
-void mp_load_per_extension_config(struct m_config *conf, const char * const file);
-void mp_load_per_output_config(struct m_config *conf, char *cfg, char *out);
-void mp_load_per_file_config(struct m_config *conf, const char * const file,
- bool search_file_dir);
-void mp_load_playback_resume(struct m_config *conf, const char *file);
-double get_main_demux_pts(struct MPContext *mpctx);
-void reset_subtitles(struct MPContext *mpctx);
-void uninit_subs(struct demuxer *demuxer);
-void reinit_subs(struct MPContext *mpctx);
-void stream_dump(struct MPContext *mpctx);
-bool timeline_set_part(struct MPContext *mpctx, int i, bool force);
-double timeline_set_from_time(struct MPContext *mpctx, double pts, bool *need_reset);
-double rel_time_to_abs(struct MPContext *mpctx, struct m_rel_time t,
- double fallback_time);
-double get_play_end_pts(struct MPContext *mpctx);
-double get_relative_time(struct MPContext *mpctx);
void execute_queued_seek(struct MPContext *mpctx);
void run_playloop(struct MPContext *mpctx);
void idle_loop(struct MPContext *mpctx);
-void init_demux_stream(struct MPContext *mpctx, enum stream_type type);
-void cleanup_demux_stream(struct MPContext *mpctx, enum stream_type type);
-void add_demuxer_tracks(struct MPContext *mpctx, struct demuxer *demuxer);
-void write_status_line(struct MPContext *mpctx, const char *line);
-void update_vo_window_title(struct MPContext *mpctx);
-int fill_audio_out_buffers(struct MPContext *mpctx, double endpts);
void handle_force_window(struct MPContext *mpctx, bool reconfig);
void add_frame_pts(struct MPContext *mpctx, double pts);
-double update_video(struct MPContext *mpctx, double endpts);
-void print_status(struct MPContext *mpctx);
-double written_audio_pts(struct MPContext *mpctx);
-void update_fps(struct MPContext *mpctx);
-void update_subtitles(struct MPContext *mpctx);
-void update_osd_msg(struct MPContext *mpctx);
-void mp_print_version(int always);
+// sub.c
+void reset_subtitles(struct MPContext *mpctx);
+void uninit_subs(struct demuxer *demuxer);
+void reinit_subs(struct MPContext *mpctx);
+void update_osd_msg(struct MPContext *mpctx);
+void update_subtitles(struct MPContext *mpctx);
// timeline/tl_matroska.c
void build_ordered_chapter_timeline(struct MPContext *mpctx);
@@ -392,4 +395,11 @@ void build_edl_timeline(struct MPContext *mpctx);
// timeline/tl_cue.c
void build_cue_timeline(struct MPContext *mpctx);
+// video.c
+int reinit_video_chain(struct MPContext *mpctx);
+int reinit_video_filters(struct MPContext *mpctx);
+double update_video(struct MPContext *mpctx, double endpts);
+void mp_force_video_refresh(struct MPContext *mpctx);
+void update_fps(struct MPContext *mpctx);
+
#endif /* MPLAYER_MP_CORE_H */