libcamera: Standardise on C compatibility headers
Now that our usage of C compatibility header is documented, use them consistently through the source code. While at it, group the C and C++ include statements as defined in the coding style, and fix a handful of #include ordering issues. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
parent
bb5f8cf495
commit
ca260d2f53
18 changed files with 22 additions and 27 deletions
|
@ -8,7 +8,7 @@
|
||||||
#define __LIBCAMERA_TIMER_H__
|
#define __LIBCAMERA_TIMER_H__
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstdint>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <libcamera/object.h>
|
#include <libcamera/object.h>
|
||||||
#include <libcamera/signal.h>
|
#include <libcamera/signal.h>
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <climits>
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <limits.h>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include "capture.h"
|
#include "capture.h"
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* options.cpp - cam - Options parsing
|
* options.cpp - cam - Options parsing
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cassert>
|
#include <assert.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstdint>
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <linux/rkisp1-config.h>
|
#include <linux/rkisp1-config.h>
|
||||||
|
|
|
@ -8,11 +8,10 @@
|
||||||
#include "device_enumerator_udev.h"
|
#include "device_enumerator_udev.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <list>
|
|
||||||
#include <map>
|
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <libudev.h>
|
#include <libudev.h>
|
||||||
|
#include <list>
|
||||||
|
#include <map>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/sysmacros.h>
|
#include <sys/sysmacros.h>
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
#ifndef __LIBCAMERA_EVENT_DISPATCHER_POLL_H__
|
#ifndef __LIBCAMERA_EVENT_DISPATCHER_POLL_H__
|
||||||
#define __LIBCAMERA_EVENT_DISPATCHER_POLL_H__
|
#define __LIBCAMERA_EVENT_DISPATCHER_POLL_H__
|
||||||
|
|
||||||
#include <libcamera/event_dispatcher.h>
|
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include <libcamera/event_dispatcher.h>
|
||||||
|
|
||||||
struct pollfd;
|
struct pollfd;
|
||||||
|
|
||||||
namespace libcamera {
|
namespace libcamera {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#ifndef __LIBCAMERA_IPC_UNIXSOCKET_H__
|
#ifndef __LIBCAMERA_IPC_UNIXSOCKET_H__
|
||||||
#define __LIBCAMERA_IPC_UNIXSOCKET_H__
|
#define __LIBCAMERA_IPC_UNIXSOCKET_H__
|
||||||
|
|
||||||
#include <cstdint>
|
#include <stdint.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
|
@ -7,14 +7,14 @@
|
||||||
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
||||||
#include <cstdio>
|
|
||||||
#include <cstdlib>
|
|
||||||
#include <ctime>
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
#include <time.h>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
|
||||||
#include <libcamera/logging.h>
|
#include <libcamera/logging.h>
|
||||||
|
|
|
@ -9,11 +9,10 @@
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <string>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <linux/media.h>
|
#include <linux/media.h>
|
||||||
|
|
|
@ -8,10 +8,9 @@
|
||||||
#include "media_object.h"
|
#include "media_object.h"
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <string>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <linux/media.h>
|
#include <linux/media.h>
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <climits>
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
#include <limits.h>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include <libcamera/request.h>
|
#include <libcamera/request.h>
|
||||||
|
|
|
@ -6,13 +6,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <iostream>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
#include <libcamera/event_dispatcher.h>
|
#include <libcamera/event_dispatcher.h>
|
||||||
#include <libcamera/event_notifier.h>
|
#include <libcamera/event_notifier.h>
|
||||||
#include <libcamera/timer.h>
|
#include <libcamera/timer.h>
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
*
|
*
|
||||||
* media_device_print_test.cpp - Print out media devices
|
* media_device_print_test.cpp - Print out media devices
|
||||||
*/
|
*/
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
* libcamera V4L2 Subdevice format handling test
|
* libcamera V4L2 Subdevice format handling test
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <climits>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
#include "v4l2_subdevice.h"
|
#include "v4l2_subdevice.h"
|
||||||
#include "v4l2_subdevice_test.h"
|
#include "v4l2_subdevice_test.h"
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
* libcamera V4L2 API tests
|
* libcamera V4L2 API tests
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
#include <libcamera/buffer.h>
|
#include <libcamera/buffer.h>
|
||||||
#include <libcamera/event_dispatcher.h>
|
#include <libcamera/event_dispatcher.h>
|
||||||
#include <libcamera/timer.h>
|
#include <libcamera/timer.h>
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
#include "thread.h"
|
#include "thread.h"
|
||||||
#include "v4l2_videodevice_test.h"
|
#include "v4l2_videodevice_test.h"
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
* controls.cpp - V4L2 device controls handling test
|
* controls.cpp - V4L2 device controls handling test
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <climits>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
#include "v4l2_videodevice.h"
|
#include "v4l2_videodevice.h"
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
* libcamera V4L2 device format handling test
|
* libcamera V4L2 device format handling test
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <climits>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
#include "v4l2_videodevice.h"
|
#include "v4l2_videodevice.h"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue