summaryrefslogtreecommitdiff
path: root/tools/h264.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h264.h')
-rw-r--r--tools/h264.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/tools/h264.h b/tools/h264.h
new file mode 100644
index 00000000..2e14136b
--- /dev/null
+++ b/tools/h264.h
@@ -0,0 +1,55 @@
+/*
+ * h264.h: H.264 bitstream decoding
+ *
+ * See the main source file 'xineliboutput.c' for copyright information and
+ * how to reach the author.
+ *
+ * $Id: h264.h,v 1.1 2008-02-04 22:43:27 phintuka Exp $
+ *
+ */
+
+#ifndef _XINELIBOUTPUT_H264_H_
+#define _XINELIBOUTPUT_H264_H_
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#ifndef VIDEO_SIZE_T
+#define VIDEO_SIZE_T
+typedef struct {
+ int width;
+ int height;
+} video_size_t;
+#endif
+
+typedef struct {
+ int width;
+ int height;
+ /* ... */
+} h264_sps_data_t;
+
+/*
+ * input: start of NAL SPS (without 00 00 01 07)
+ */
+int h264_parse_sps(const uint8_t *buf, int len, h264_sps_data_t *sps);
+
+/*
+ * input: start of H.264 video data (not PES)
+ */
+int h264_get_picture_type(const uint8_t *buf, int len);
+
+/*
+ * input: start of H.264 video data (not PES)
+ */
+int h264_get_video_size(const uint8_t *buf, int len, video_size_t *size);
+
+
+#ifdef __cplusplus
+} /* extern "C" { */
+#endif
+
+
+#endif /* _XINELIBOUTPUT_H264_H_ */