diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-10-30 21:32:17 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-02 04:16:46 +0200 |
commit | 24dfc70a08a785cc0d5b9f58feea914a53d30ab7 (patch) | |
tree | fbcc688e3667eb015c6935078c891debc9d4cd71 | |
parent | 4093dd23af9a9c6aa41b8f0fd196c25a0cec353b (diff) | |
download | mpv-24dfc70a08a785cc0d5b9f58feea914a53d30ab7.tar.bz2 mpv-24dfc70a08a785cc0d5b9f58feea914a53d30ab7.tar.xz |
mpcommon.h: reduce header dependencies on other headers
Use "struct foo *ptr" without full definition of the struct, instead
of using typedef names and including other headers for them.
-rw-r--r-- | mpcommon.h | 25 | ||||
-rw-r--r-- | subreader.h | 4 |
2 files changed, 18 insertions, 11 deletions
diff --git a/mpcommon.h b/mpcommon.h index 14c1519d18..f1f01d7942 100644 --- a/mpcommon.h +++ b/mpcommon.h @@ -19,13 +19,13 @@ #ifndef MPLAYER_MPCOMMON_H #define MPLAYER_MPCOMMON_H -#include "subreader.h" -#include "libmpdemux/demuxer.h" -#include "libmpdemux/stheader.h" +#include <stdbool.h> + +struct subtitle; extern double sub_last_pts; extern struct ass_track *ass_track; -extern subtitle *vo_sub_last; +extern struct subtitle *vo_sub_last; extern int disable_system_conf; extern int disable_user_conf; @@ -34,14 +34,21 @@ extern const char *mencoder_version; extern const char *mplayer_version; struct MPContext; +struct demuxer; +struct demux_stream; +struct demux_attachment; +struct sh_video; +struct MPOpts; void print_version(const char* name); void update_subtitles(struct MPContext *mpctx, struct MPOpts *opts, - sh_video_t *sh_video, double refpts, double sub_offset, - demux_stream_t *d_dvdsub, int reset); -void update_teletext(sh_video_t *sh_video, demuxer_t *demuxer, int reset); -int select_audio(demuxer_t* demuxer, int audio_id, char* audio_lang); -void set_osd_subtitle(struct MPContext *mpctx, subtitle *subs); + struct sh_video *sh_video, double refpts, + double sub_offset, struct demux_stream *d_dvdsub, + int reset); +void update_teletext(struct sh_video *sh_video, struct demuxer *demuxer, + int reset); +int select_audio(struct demuxer *demuxer, int audio_id, char *audio_lang); +void set_osd_subtitle(struct MPContext *mpctx, struct subtitle *subs); bool attachment_is_font(struct demux_attachment *att); #endif /* MPLAYER_MPCOMMON_H */ diff --git a/subreader.h b/subreader.h index f1706dc120..b1aa07421b 100644 --- a/subreader.h +++ b/subreader.h @@ -60,7 +60,7 @@ extern int sub_format; #define SUB_ALIGNMENT_TOPCENTER 8 #define SUB_ALIGNMENT_TOPRIGHT 9 -typedef struct { +typedef struct subtitle { int lines; @@ -72,7 +72,7 @@ typedef struct { unsigned char alignment; } subtitle; -typedef struct { +typedef struct sub_data { subtitle *subtitles; char *filename; int sub_uses_time; |