summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/h264.c9
-rw-r--r--tools/mpeg.c5
-rw-r--r--tools/mpeg.h7
-rw-r--r--tools/pes.c7
-rw-r--r--tools/pes.h14
-rw-r--r--tools/ts.c11
-rw-r--r--tools/ts.h14
7 files changed, 46 insertions, 21 deletions
diff --git a/tools/h264.c b/tools/h264.c
index b6380ef0..8adcf7cc 100644
--- a/tools/h264.c
+++ b/tools/h264.c
@@ -4,15 +4,14 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: h264.c,v 1.5 2008-07-29 14:01:36 phintuka Exp $
+ * $Id: h264.c,v 1.6 2009-02-16 16:03:18 phintuka Exp $
*
*/
+#include <stdint.h>
+#include <string.h>
-#ifndef LOGDBG
-# include <vdr/tools.h>
-# include "../logdefs.h"
-#endif
+#include "../logdefs.h"
#define NOCACHE 1
#include "bitstream.h"
diff --git a/tools/mpeg.c b/tools/mpeg.c
index 029f8ede..b827e096 100644
--- a/tools/mpeg.c
+++ b/tools/mpeg.c
@@ -4,10 +4,13 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: mpeg.c,v 1.2 2008-06-11 15:51:19 phintuka Exp $
+ * $Id: mpeg.c,v 1.3 2009-02-16 16:03:18 phintuka Exp $
*
*/
+#include <inttypes.h>
+#include <string.h>
+
#include "mpeg.h"
diff --git a/tools/mpeg.h b/tools/mpeg.h
index 40c57eff..8a9b6493 100644
--- a/tools/mpeg.h
+++ b/tools/mpeg.h
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: mpeg.h,v 1.5 2009-02-14 20:39:20 phintuka Exp $
+ * $Id: mpeg.h,v 1.6 2009-02-16 16:03:18 phintuka Exp $
*
*/
@@ -26,18 +26,17 @@ extern "C" {
#define P_FRAME 2
#define B_FRAME 3
-typedef struct {
+typedef struct mpeg_rational_s {
int num;
int den;
} mpeg_rational_t;
-typedef struct {
+typedef struct video_size_s {
uint16_t width;
uint16_t height;
mpeg_rational_t pixel_aspect;
} video_size_t;
-
extern const char * const picture_type_str[];
/*
diff --git a/tools/pes.c b/tools/pes.c
index a7205311..ef80b3a3 100644
--- a/tools/pes.c
+++ b/tools/pes.c
@@ -4,10 +4,15 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: pes.c,v 1.8 2009-02-04 12:11:58 phintuka Exp $
+ * $Id: pes.c,v 1.9 2009-02-16 16:03:18 phintuka Exp $
*
*/
+#include <inttypes.h>
+#include <string.h>
+
+#include "../logdefs.h"
+
#include "mpeg.h"
#include "h264.h"
diff --git a/tools/pes.h b/tools/pes.h
index 93d6dfb5..94e9cff8 100644
--- a/tools/pes.h
+++ b/tools/pes.h
@@ -4,14 +4,16 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: pes.h,v 1.10 2009-02-10 11:24:20 phintuka Exp $
+ * $Id: pes.h,v 1.11 2009-02-16 16:03:18 phintuka Exp $
*
*/
#ifndef _XINELIBOUTPUT_PES_H_
#define _XINELIBOUTPUT_PES_H_
-#include "mpeg.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
/*
@@ -70,9 +72,11 @@ int pes_strip_pts_dts(uint8_t *buf, int len);
* payload
*/
+struct video_size_s;
+
int pes_is_frame_h264(const uint8_t *buf, int len);
uint8_t pes_get_picture_type(const uint8_t *buf, int len);
-int pes_get_video_size(const uint8_t *buf, int len, video_size_t *size, int h264);
+int pes_get_video_size(const uint8_t *buf, int len, struct video_size_s *size, int h264);
static inline int pes_is_mpeg1(const uint8_t *header)
{
@@ -105,4 +109,8 @@ static inline int pes_packet_len(const uint8_t *data, const int len)
}
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif
+
#endif /* _XINELIBOUTPUT_PES_H_ */
diff --git a/tools/ts.c b/tools/ts.c
index f48149e4..2723cd9b 100644
--- a/tools/ts.c
+++ b/tools/ts.c
@@ -4,14 +4,17 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: ts.c,v 1.4 2009-02-12 16:23:41 rofafor Exp $
+ * $Id: ts.c,v 1.5 2009-02-16 16:03:18 phintuka Exp $
*
*/
-#ifndef LOGDBG
-# include "../logdefs.h"
-#endif
+#include <inttypes.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "../logdefs.h"
+#include "mpeg.h"
#include "ts.h"
#include "pes.h"
diff --git a/tools/ts.h b/tools/ts.h
index a7286c97..4d0c95a8 100644
--- a/tools/ts.h
+++ b/tools/ts.h
@@ -4,14 +4,17 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: ts.h,v 1.7 2009-02-14 20:44:30 phintuka Exp $
+ * $Id: ts.h,v 1.8 2009-02-16 16:03:18 phintuka Exp $
*
*/
#ifndef _XINELIBOUTPUT_TS_H_
#define _XINELIBOUTPUT_TS_H_
-#include "mpeg.h"
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif
+
/* Avoid warnings when included to VDR plugin */
#undef TS_SYNC_BYTE
@@ -136,6 +139,7 @@ int ts_parse_pmt(pmt_data_t *pmt, uint program_no, const uint8_t *ts_data);
*/
typedef struct ts_state_s ts_state_t;
+struct video_size_s;
ts_state_t *ts_state_init(int buffer_size);
void ts_state_reset(ts_state_t *ts);
@@ -143,7 +147,11 @@ void ts_state_dispose(ts_state_t *ts);
int64_t ts_get_pts(ts_state_t *ts, const uint8_t *data);
int ts_get_picture_type(ts_state_t *ts, const uint8_t *data, int h264);
-int ts_get_video_size(ts_state_t *ts, const uint8_t *data, video_size_t *size, int h264);
+int ts_get_video_size(ts_state_t *ts, const uint8_t *data, struct video_size_s *size, int h264);
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif
#endif // _XINELIBOUTPUT_TS_H_