Here is a patch to make libmpeg2 headers compile standalone. This allows #including them directly without worrying about header inclusion order or having to #include system headers before libmpeg2 headers.
Diego
Index: include/mpeg2.h
===================================================================
--- include/mpeg2.h (revision 1204)
+++ include/mpeg2.h (working copy)
@@ -24,6 +24,8 @@
#ifndef LIBMPEG2_MPEG2_H
#define LIBMPEG2_MPEG2_H
+#include <stdint.h>
+
#define MPEG2_VERSION(a,b,c) (((a)<<16)|((b)<<8)|(c))
#define MPEG2_RELEASE MPEG2_VERSION (0, 5, 1) /* 0.5.1 */
Index: include/mpeg2convert.h
===================================================================
--- include/mpeg2convert.h (revision 1204)
+++ include/mpeg2convert.h (working copy)
@@ -24,6 +24,8 @@
#ifndef LIBMPEG2_MPEG2CONVERT_H
#define LIBMPEG2_MPEG2CONVERT_H
+#include "mpeg2.h"
+
mpeg2_convert_t mpeg2convert_rgb32;
mpeg2_convert_t mpeg2convert_rgb24;
mpeg2_convert_t mpeg2convert_rgb16;
Index: include/video_out.h
===================================================================
--- include/video_out.h (revision 1204)
+++ include/video_out.h (working copy)
@@ -24,6 +24,8 @@
#ifndef LIBMPEG2_VIDEO_OUT_H
#define LIBMPEG2_VIDEO_OUT_H
+#include <stdint.h>
+
struct mpeg2_sequence_s;
struct mpeg2_convert_init_s;
typedef struct {
Index: include/mmx.h
===================================================================
--- include/mmx.h (revision 1204)
+++ include/mmx.h (working copy)
@@ -24,6 +24,8 @@
#ifndef LIBMPEG2_MMX_H
#define LIBMPEG2_MMX_H
+#include "attributes.h"
+
/*
* The type of an value that fits in an MMX register (note that long
* long constant values MUST be suffixed by LL and unsigned long long
Index: libmpeg2/mpeg2_internal.h
===================================================================
--- libmpeg2/mpeg2_internal.h (revision 1204)
+++ libmpeg2/mpeg2_internal.h (working copy)
@@ -24,6 +24,11 @@
#ifndef LIBMPEG2_MPEG2_INTERNAL_H
#define LIBMPEG2_MPEG2_INTERNAL_H
+#include <stdint.h>
+
+#include "attributes.h"
+#include "mpeg2.h"
+
#define STATE_INTERNAL_NORETURN ((mpeg2_state_t)-1)
/* macroblock modes */
Index: libmpeg2/vlc.h
===================================================================
--- libmpeg2/vlc.h (revision 1204)
+++ libmpeg2/vlc.h (working copy)
@@ -24,6 +24,10 @@
#ifndef LIBMPEG2_VLC_H
#define LIBMPEG2_VLC_H
+#include <stdint.h>
+
+#include "mpeg2_internal.h"
+
#define GETWORD(bit_buf,shift,bit_ptr) \
do { \
bit_buf |= ((bit_ptr[0] << 8) | bit_ptr[1]) << (shift); \
signature.asc
Description: Digital signature
------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________ Libmpeg2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmpeg2-devel
