xref: /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/common/mediactl/tools.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * Media controller test application
3  *
4  * Copyright (C) 2010-2011 Ideas on board SPRL
5  *
6  * Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License as published
10  * by the Free Software Foundation; either version 2.1 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef __TOOLS_H__
23 #define __TOOLS_H__
24 
25 #define ARRAY_SIZE(array)   (sizeof(array) / sizeof((array)[0]))
26 #define FIELD_SIZEOF(t, f)  (sizeof(((t*)0)->f))
27 
28 void media_print_streampos(struct media_device *media, const char *p,
29                            const char *end);
30 
31 #endif /* __TOOLS_H__ */
32