-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathdata_rw.h
55 lines (40 loc) · 1.7 KB
/
data_rw.h
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
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
librtmp
Copyright (C) 2009 ITOYANAGI Kazunori
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
ITOYANAGI Kazunori
*/
#ifndef _data_rw_H_
#define _data_rw_H_
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C" {
#endif
extern int is_little_endian(void);
extern int is_big_endian(void);
extern int read_be16int(unsigned char *data);
extern int read_le32int(unsigned char *data);
extern int read_be32int(unsigned char *data);
extern int read_be24int(unsigned char *data);
extern double read_be64double(unsigned char *data);
extern void write_be16int(unsigned char *data, int value);
extern void write_be24int(unsigned char *data, int value);
extern void write_le32int(unsigned char *data, int value);
extern void write_be32int(unsigned char *data, int value);
extern void write_be64double(unsigned char *data, double value);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
#endif
#endif