From e9022ec470e9334a6d0f3cb044027964ac4f63f6 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Wed, 12 Jan 2011 15:29:31 +0200 Subject: cleanup: move MP_NOPTS_VALUE definition to mpcommon.h --- libmpcodecs/vf.h | 5 +---- libmpdemux/demuxer.h | 4 +--- libvo/video_out.h | 5 +---- mpcommon.h | 3 +++ spudec.c | 3 +-- subreader.c | 2 +- 6 files changed, 8 insertions(+), 14 deletions(-) diff --git a/libmpcodecs/vf.h b/libmpcodecs/vf.h index 8814ffe11a..58cfaaf787 100644 --- a/libmpcodecs/vf.h +++ b/libmpcodecs/vf.h @@ -20,6 +20,7 @@ #define MPLAYER_VF_H #include "mp_image.h" +#include "mpcommon.h" struct MPOpts; struct vf_instance; @@ -116,10 +117,6 @@ typedef struct vf_seteq_s #include "vfcap.h" -//FIXME this should be in a common header, but i dunno which -#define MP_NOPTS_VALUE (-1LL<<63) //both int64_t and double should be able to represent this exactly - - // functions: void vf_mpi_clear(mp_image_t* mpi,int x0,int y0,int w,int h); mp_image_t* vf_get_image(vf_instance_t* vf, unsigned int outfmt, int mp_imgtype, int mp_imgflag, int w, int h); diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h index 9b66e27910..df0fdaa9bb 100644 --- a/libmpdemux/demuxer.h +++ b/libmpdemux/demuxer.h @@ -27,6 +27,7 @@ #include "stream/stream.h" #include "bstr.h" +#include "mpcommon.h" struct MPOpts; @@ -96,9 +97,6 @@ struct MPOpts; // A virtual demuxer type for the network code #define DEMUXER_TYPE_PLAYLIST (2<<16) - -#define MP_NOPTS_VALUE (-1LL<<63) //both int64_t and double should be able to represent this exactly - enum timestamp_type { TIMESTAMP_TYPE_PTS, TIMESTAMP_TYPE_SORT, diff --git a/libvo/video_out.h b/libvo/video_out.h index 36a161aaf5..0630aee9ca 100644 --- a/libvo/video_out.h +++ b/libvo/video_out.h @@ -26,11 +26,8 @@ #include #include -//#include "font_load.h" #include "libmpcodecs/img_format.h" -//#include "vidix/vidix.h" - -#define MP_NOPTS_VALUE (-1LL<<63) +#include "mpcommon.h" #define VO_EVENT_EXPOSE 1 #define VO_EVENT_RESIZE 2 diff --git a/mpcommon.h b/mpcommon.h index ac57ae9d02..82b860bd87 100644 --- a/mpcommon.h +++ b/mpcommon.h @@ -19,6 +19,9 @@ #ifndef MPLAYER_MPCOMMON_H #define MPLAYER_MPCOMMON_H +// both int64_t and double should be able to represent this exactly +#define MP_NOPTS_VALUE (-1LL<<63) + extern const char *mplayer_version; #endif /* MPLAYER_MPCOMMON_H */ diff --git a/spudec.c b/spudec.c index de7d443ffc..f48d47fd2a 100644 --- a/spudec.c +++ b/spudec.c @@ -43,6 +43,7 @@ #include "libavutil/avutil.h" #include "ffmpeg_files/intreadwrite.h" #include "libswscale/swscale.h" +#include "mpcommon.h" /* Valid values for spu_aamode: 0: none (fastest, most ugly) @@ -1336,8 +1337,6 @@ void spudec_set_hw_spu(void *this, struct vo *hw_spu) vo_control(hw_spu, VOCTRL_SET_SPU_PALETTE, spu->global_palette); } -#define MP_NOPTS_VALUE (-1LL<<63) //both int64_t and double should be able to represent this exactly - /** * palette must contain at least 256 32-bit entries, otherwise crashes * are possible diff --git a/subreader.c b/subreader.c index 3d422ddbdf..c9b3261c0e 100644 --- a/subreader.c +++ b/subreader.c @@ -32,6 +32,7 @@ #include "config.h" #include "mp_msg.h" #include "subreader.h" +#include "mpcommon.h" #include "stream/stream.h" #include "libavutil/common.h" #include "libavutil/avstring.h" @@ -2359,7 +2360,6 @@ void sub_add_text(subtitle *sub, const char *txt, int len, double endpts) { #endif } -#define MP_NOPTS_VALUE (-1LL<<63) /** * \brief remove outdated subtitle lines. * \param sub subtitle struct to modify -- cgit v1.2.3