aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Uoti Urpala <uau@symbol.nonexistent.invalid>2008-04-23 09:49:25 +0300
committerGravatar Uoti Urpala <uau@symbol.nonexistent.invalid>2008-04-23 13:48:38 +0300
commitc510959da57b20a316d388661c4a873d27c4dc8f (patch)
treed2e6ee6aff1f14e16b1086bc19f84fcad17fa06d
parent66bd120a3a8c15ee3bd7ce41e7258e8b33925864 (diff)
Remove some unnecessary recursive includes
Remove some #include lines from headers, some of those removals made possible by using incomplete struct types instead of typedefs. Include mp_osd.h in mplayer.c and command.c after removing it from mp_core.h. Remove "#ifdef USE_ASS" around some "struct ass_track_s *" fields which will now compile even without ASS support.
-rw-r--r--command.c1
-rw-r--r--libmpdemux/demuxer.h5
-rw-r--r--libmpdemux/stheader.h9
-rw-r--r--mp_core.h31
-rw-r--r--mplayer.c1
5 files changed, 17 insertions, 30 deletions
diff --git a/command.c b/command.c
index 311ee9c936..29ccdcfd99 100644
--- a/command.c
+++ b/command.c
@@ -18,6 +18,7 @@
#include "metadata.h"
#include "libmpcodecs/vf.h"
#include "libmpcodecs/vd.h"
+#include "mp_osd.h"
#include "libvo/video_out.h"
#include "libvo/font_load.h"
#include "playtree.h"
diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h
index c61f564eb7..70c6639654 100644
--- a/libmpdemux/demuxer.h
+++ b/libmpdemux/demuxer.h
@@ -6,9 +6,6 @@
#include <string.h>
#include "stream/stream.h"
-#ifdef USE_ASS
-#include "libass/ass_types.h"
-#endif
struct MPOpts;
@@ -108,7 +105,7 @@ typedef struct demux_packet_st {
struct demux_packet_st* next;
} demux_packet_t;
-typedef struct {
+typedef struct demux_stream {
int buffer_pos; // current buffer position
int buffer_size; // current buffer size
unsigned char* buffer; // current buffer, never free() it, always use free_demux_packet(buffer_ref);
diff --git a/libmpdemux/stheader.h b/libmpdemux/stheader.h
index a81f349c02..88d02506e0 100644
--- a/libmpdemux/stheader.h
+++ b/libmpdemux/stheader.h
@@ -1,7 +1,6 @@
#ifndef MPLAYER_STHEADER_H
#define MPLAYER_STHEADER_H
-#include "demuxer.h"
#include "aviheader.h"
#include "ms_hdr.h"
struct MPOpts;
@@ -11,7 +10,7 @@ struct MPOpts;
typedef struct sh_audio {
struct MPOpts *opts;
int aid;
- demux_stream_t *ds;
+ struct demux_stream *ds;
struct codecs_st *codec;
unsigned int format;
int initialized;
@@ -59,7 +58,7 @@ typedef struct sh_audio {
typedef struct sh_video {
struct MPOpts *opts;
int vid;
- demux_stream_t *ds;
+ struct demux_stream *ds;
struct codecs_st *codec;
unsigned int format;
int initialized;
@@ -109,9 +108,7 @@ typedef struct sh_sub {
int forced_subs_only;
unsigned char* extradata; // extra header data passed from demuxer
int extradata_len;
-#ifdef USE_ASS
- ass_track_t* ass_track; // for SSA/ASS streams (type == 'a')
-#endif
+ struct ass_track_s *ass_track; // for SSA/ASS streams (type == 'a')
char* lang; // track language
int default_track;
} sh_sub_t;
diff --git a/mp_core.h b/mp_core.h
index 6361f87c47..1454d56e42 100644
--- a/mp_core.h
+++ b/mp_core.h
@@ -2,14 +2,7 @@
#define MPLAYER_MP_CORE_H
#include "options.h"
-#include "mp_osd.h"
-#include "libao2/audio_out.h"
-#include "playtree.h"
-#include "stream/stream.h"
-#include "libmpdemux/demuxer.h"
-#include "libmpdemux/stheader.h"
#include "mixer.h"
-#include "libvo/video_out.h"
#include "subreader.h"
// definitions used internally by the core player code
@@ -48,18 +41,18 @@ typedef struct MPContext {
int osd_show_percentage;
int osd_function;
const ao_functions_t *audio_out;
- play_tree_t *playtree;
- play_tree_iter_t *playtree_iter;
+ struct play_tree *playtree;
+ struct play_tree_iter *playtree_iter;
int eof;
int play_tree_step;
- stream_t *stream;
- demuxer_t *demuxer;
- sh_audio_t *sh_audio;
- sh_video_t *sh_video;
- demux_stream_t *d_audio;
- demux_stream_t *d_video;
- demux_stream_t *d_sub;
+ struct stream_st *stream;
+ struct demuxer_st *demuxer;
+ struct sh_audio *sh_audio;
+ struct sh_video *sh_video;
+ struct demux_stream *d_audio;
+ struct demux_stream *d_video;
+ struct demux_stream *d_sub;
mixer_t mixer;
struct vo *video_out;
// Frames buffered in the vo ready to flip. Currently always 0 or 1.
@@ -88,11 +81,9 @@ typedef struct MPContext {
int set_of_sub_pos;
int set_of_sub_size;
int global_sub_indices[SUB_SOURCES];
-#ifdef USE_ASS
// set_of_ass_tracks[i] contains subtitles from set_of_subtitles[i]
// parsed by libass or NULL if format unsupported
- ass_track_t* set_of_ass_tracks[MAX_SUBTITLE_FILES];
-#endif
+ struct ass_track_s *set_of_ass_tracks[MAX_SUBTITLE_FILES];
sub_data* set_of_subtitles[MAX_SUBTITLE_FILES];
int file_format;
@@ -118,7 +109,7 @@ extern int file_filter;
extern int forced_subs_only;
-int build_afilter_chain(struct MPContext *mpctx, sh_audio_t *sh_audio, ao_data_t *ao_data);
+int build_afilter_chain(struct MPContext *mpctx, struct sh_audio *sh_audio, struct ao_data_s *ao_data);
void uninit_player(struct MPContext *mpctx, unsigned int mask);
void reinit_audio_chain(struct MPContext *mpctx);
void init_vo_spudec(struct MPContext *mpctx);
diff --git a/mplayer.c b/mplayer.c
index 75be76e901..3b724899aa 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -54,6 +54,7 @@
#include "subreader.h"
+#include "mp_osd.h"
#include "libvo/video_out.h"
#include "libvo/font_load.h"