summaryrefslogtreecommitdiff
path: root/inc/av_format_identify.h
diff options
context:
space:
mode:
authorzhengchao <[email protected]>2018-07-18 11:01:55 +0800
committerzhengchao <[email protected]>2018-07-18 11:01:55 +0800
commitcde1caf893390ed40f72788f84a41bf3e104cbbd (patch)
treeac650470b547ad8d4cb4bd010f2e8ff540948ffc /inc/av_format_identify.h
parent96c7a36449f80ab767a6eac122d66227d2edaed7 (diff)
reviewed by zhengchao, propose multiple suggestions.
Diffstat (limited to 'inc/av_format_identify.h')
-rw-r--r--inc/av_format_identify.h36
1 files changed, 4 insertions, 32 deletions
diff --git a/inc/av_format_identify.h b/inc/av_format_identify.h
index 132cb8b..63dbb87 100644
--- a/inc/av_format_identify.h
+++ b/inc/av_format_identify.h
@@ -1,41 +1,13 @@
#ifndef _AV_FORMAT_IDENTIFY_H
#define _AV_FORMAT_IDENTIFY_H
-#include <arpa/inet.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <math.h>
-#include <sys/types.h>
-#include <sys/io.h>
+#define AV_CONTAINER_UNKNOWN 0
+#define AV_CONTAINER_MPEGTS 1
+#define AV_CONTAINER_FLV 2
+#define AV_CONTAINER_MP4 3
-#include <arpa/inet.h>
-#define AV_CONTAINER_MPEGTS 1
-#define AV_CONTAINER_FLV 2
-#define AV_CONTAINER_MP4 3
-#define UNKNOWN 4
-
-/*To find that whether the initial size bytes pointed to by buff satisfies the rules of MPEG-TS AV Container
- * by supposing that its first 1 byte is sync_byte in ts header.*/
-int is_mpeg_ts_each(const char *buff, size_t size);
-/*To identify whether the whole byte stream belongs to MPEG_TS container*/
-int is_mpeg_ts(const char* buff, size_t size);
-
-
-/*To find that whether the initial size bytes pointed to by buff satisfies the rules of FLV AV Container
- * by supposing that its first 1 byte is TagType in FLV Tag Header.*/
-int is_flv_each(const char* buff, size_t size);
-/*To identify whether the whole byte stream belongs to FLV container*/
-int is_flv(const char* buff, size_t size);
-
-/*To find that whether the initial size bytes pointed to by buff satisfies the rules of MP4 AV Container
- * by supposing that its first 4 byte is Boxtype in Box of MP4 file.*/
-int is_mp4_each(const char* buff, size_t size);
-/*To identify whether the whole byte stream belongs to MP4 container*/
-int is_mp4(const char* buff, size_t size);
/*To identify the container type of the whole byte stream*/
int AV_container_identify(const char* buff, size_t size);