UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
segd_api.h
1 /* segd_api.h */
2 /* $Id: segd_api.h,v 1.3 2006/10/18 12:42:38 vlad Exp $ */
3 #ifndef __segd_api_h
4 #define __segd_api_h
5 
6 #include <stdio.h>
7 
8 #include "segd_file.h"
9 
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif /* __cplusplus */
14 
15  /**************************************************/
16 
19  int segd_parse_gh1 (const unsigned char raw_gh1[SEGD_GH1_Size],
20  SEGD_GeneralHeader1* gh1);
21 
24  int segd_parse_gh2 (const unsigned char raw_gh2[SEGD_GH2_Size],
25  SEGD_GeneralHeader2* gh2);
26 
29  int segd_parse_ghn (const unsigned char raw_ghn[SEGD_GHN_Size],
30  SEGD_GeneralHeaderN* ghn);
31 
35  int segd_parse_cs (const unsigned char raw_cs[SEGD_CS_Size],
36  SEGD_ChannelSet* cs, int segd_rev);
37 
41  int segd_parse_sos (const unsigned char raw_sos[SEGD_SOS_Size],
42  int* sos_flags);
43 
47  int segd_parse_tw (const unsigned char raw_tw[SEGD_TW_Size],
48  float* tw);
49 
52  int segd_parse_dth (const unsigned char raw_dth[SEGD_DTH_Size],
54 
58  int segd_parse_eth (const unsigned char raw_eth[SEGD_ETH_Size],
59  SEGD_ExtTraceHeader* eth);
60 
61 
62  /**************************************************/
63 
65  void segd_parse_date (const SEGD_GeneralHeader1* gh1,
66  int* year, int* month, int* day);
67 
68  /**************************************************/
69 
72  void segd_print_gh1 (FILE* fp, const SEGD_GeneralHeader1* gh1);
73 
76  void segd_print_raw_gh1 (FILE* fp,
77  const unsigned char raw_gh1[SEGD_GH1_Size]);
78 
79 
82  void segd_print_gh2 (FILE* fp, const SEGD_GeneralHeader2* gh2);
83 
86  void segd_print_raw_gh2 (FILE* fp,
87  const unsigned char raw_gh2[SEGD_GH2_Size]);
88 
89 
92  void segd_print_ghn (FILE* fp, const SEGD_GeneralHeaderN* ghn);
93 
96  void segd_print_raw_ghn (FILE* fp,
97  const unsigned char raw_ghn[SEGD_GHN_Size]);
98 
99 
102  void segd_print_cs (FILE* fp, const SEGD_ChannelSet* cs);
103 
106  void segd_print_raw_cs (FILE* fp,
107  const unsigned char raw_cs[SEGD_CS_Size]);
108 
109 
112  void segd_print_dth (FILE* fp, const SEGD_DemuxTraceHeader* dth);
113 
116  void segd_print_raw_dth (FILE* fp,
117  const unsigned char raw_dth[SEGD_DTH_Size]);
118 
119 
122  void segd_print_eth (FILE* fp, const SEGD_ExtTraceHeader* eth);
123 
126  void segd_print_raw_eth (FILE* fp,
127  const unsigned char raw_eth[SEGD_ETH_Size]);
128 
129 
132  void segd_print_sos (FILE* fp, int sos_flags);
133 
134 
137  void segd_print_hex_dump (FILE* fp,
138  const unsigned char* buf, int buf_size);
139 
140  /**************************************************/
141 
144  int segd_bits_per_samples (SEGD_FormatCode format_code);
145 
146 
147  /**************************************************/
148 
152  int segd_trans_samples (SEGD_FormatCode fc,
153  const unsigned char* src,
154  int src_size,
155  float* dst, int dst_n);
156 
159  float segd_trans_x022 (const unsigned char* raw);
160 
163  float segd_trans_x024 (const unsigned char* raw);
164 
167  void segd_trans_0015 (const unsigned char* raw, float dst[4]);
168 
171  void segd_trans_8015 (const unsigned char* raw, float dst[4]);
172 
175  float segd_trans_x042 (const unsigned char* raw);
176 
179  float segd_trans_x044 (const unsigned char* raw);
180 
183  float segd_trans_x036 (const unsigned char* raw);
184 
187  float segd_trans_x038 (const unsigned char* raw);
188 
191  float segd_trans_x048 (const unsigned char* raw);
192 
195  float segd_trans_x058 (const unsigned char* raw);
196 
197 
198 #ifdef __cplusplus
199 };
200 #endif /* __cplusplus */
201 
202 #endif /* segd_api.h */
Definition: segd_file.h:380
Definition: segd_file.h:309
Definition: segd_file.h:340
Definition: segd_file.h:397
Definition: segd_file.h:277
Definition: segd_file.h:324