Blame view

DxDecoder/H264ParseSPS.h 868 Bytes
85cc8cb9   Hu Chunming   原版代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
  
  //
  //  H264ParseSPS.h
  //
  //  Created by lzj<lizhijian_21@163.com> on 2018/7/6.
  //  Copyright © 2018 LZJ. All rights reserved.
  //
  
  #ifndef H264ParseSPS_h
  #define H264ParseSPS_h
  #ifdef __cplusplus
  extern "C"
  {
  #endif
  #include <stdio.h>
  
  	typedef struct
  	{
  		unsigned int profile_idc;
  		unsigned int level_idc;
  
  		unsigned int width;
  		unsigned int height;
  		unsigned int fps;       //SPS中可能不包含FPS信息
  	} sps_info_struct;
  
  
  	/**
  	解析SPS数据信息
  
  	@param data SPS数据内容,需要Nal类型为0x7数据的开始(比如:67 42 00 28 ab 40 22 01 e3 cb cd c0 80 80 a9 02)
  	@param dataSize SPS数据的长度
  	@param info SPS解析之后的信息数据结构体
  	@return success:1fail:0
  
  	*/
  	int h264_parse_sps(const unsigned char *data, unsigned int dataSize, sps_info_struct *info);
  
  #ifdef __cplusplus
  }
  #endif
  #endif /* H264ParseSPS_h */