mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-12 23:09:45 +03:00
test: Remove using namespace in header files
"using namespace" in a header file propagates the namespace to the files including the header file. So it should be avoided. This removes "using namespace" in header files in test. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
af60569cbc
commit
1526650fc7
16 changed files with 33 additions and 35 deletions
|
@ -21,6 +21,7 @@
|
||||||
#include "camera_test.h"
|
#include "camera_test.h"
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
|
using namespace libcamera;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
#include "camera_test.h"
|
#include "camera_test.h"
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
|
using namespace libcamera;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include "camera_test.h"
|
#include "camera_test.h"
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
|
using namespace libcamera;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include "camera_test.h"
|
#include "camera_test.h"
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
|
using namespace libcamera;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "camera_test.h"
|
#include "camera_test.h"
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
|
using namespace libcamera;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
class GstreamerTest
|
class GstreamerTest
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
|
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
|
using namespace libcamera;
|
||||||
|
|
||||||
BufferSource::BufferSource()
|
BufferSource::BufferSource()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,20 +12,18 @@
|
||||||
#include "libcamera/internal/media_device.h"
|
#include "libcamera/internal/media_device.h"
|
||||||
#include "libcamera/internal/v4l2_videodevice.h"
|
#include "libcamera/internal/v4l2_videodevice.h"
|
||||||
|
|
||||||
using namespace libcamera;
|
|
||||||
|
|
||||||
class BufferSource
|
class BufferSource
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BufferSource();
|
BufferSource();
|
||||||
~BufferSource();
|
~BufferSource();
|
||||||
|
|
||||||
int allocate(const StreamConfiguration &config);
|
int allocate(const libcamera::StreamConfiguration &config);
|
||||||
const std::vector<std::unique_ptr<FrameBuffer>> &buffers();
|
const std::vector<std::unique_ptr<libcamera::FrameBuffer>> &buffers();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::shared_ptr<MediaDevice> media_;
|
std::shared_ptr<libcamera::MediaDevice> media_;
|
||||||
std::vector<std::unique_ptr<FrameBuffer>> buffers_;
|
std::vector<std::unique_ptr<libcamera::FrameBuffer>> buffers_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_BUFFER_SOURCE_TEST_H__ */
|
#endif /* __LIBCAMERA_BUFFER_SOURCE_TEST_H__ */
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
#include <libcamera/camera.h>
|
#include <libcamera/camera.h>
|
||||||
#include <libcamera/camera_manager.h>
|
#include <libcamera/camera_manager.h>
|
||||||
|
|
||||||
using namespace libcamera;
|
|
||||||
|
|
||||||
class CameraTest
|
class CameraTest
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -21,8 +19,8 @@ public:
|
||||||
~CameraTest();
|
~CameraTest();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CameraManager *cm_;
|
libcamera::CameraManager *cm_;
|
||||||
std::shared_ptr<Camera> camera_;
|
std::shared_ptr<libcamera::Camera> camera_;
|
||||||
int status_;
|
int status_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include "camera_test.h"
|
#include "camera_test.h"
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
|
using namespace libcamera;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
|
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
using namespace libcamera;
|
|
||||||
|
|
||||||
class MediaDeviceTest : public Test
|
class MediaDeviceTest : public Test
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -25,10 +23,10 @@ public:
|
||||||
protected:
|
protected:
|
||||||
int init();
|
int init();
|
||||||
|
|
||||||
std::shared_ptr<MediaDevice> media_;
|
std::shared_ptr<libcamera::MediaDevice> media_;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<DeviceEnumerator> enumerator_;
|
std::unique_ptr<libcamera::DeviceEnumerator> enumerator_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_MEDIADEVICE_TEST_H__ */
|
#endif /* __LIBCAMERA_MEDIADEVICE_TEST_H__ */
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
#include "camera_test.h"
|
#include "camera_test.h"
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
using namespace libcamera;
|
|
||||||
|
|
||||||
class SerializationTest : public CameraTest, public Test
|
class SerializationTest : public CameraTest, public Test
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -24,10 +22,10 @@ public:
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool equals(const ControlInfoMap &lhs,
|
static bool equals(const libcamera::ControlInfoMap &lhs,
|
||||||
const ControlInfoMap &rhs);
|
const libcamera::ControlInfoMap &rhs);
|
||||||
static bool equals(const ControlList &lhs,
|
static bool equals(const libcamera::ControlList &lhs,
|
||||||
const ControlList &rhs);
|
const libcamera::ControlList &rhs);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_SERIALIZATION_TEST_H__ */
|
#endif /* __LIBCAMERA_SERIALIZATION_TEST_H__ */
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
|
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
using namespace libcamera;
|
|
||||||
|
|
||||||
class V4L2SubdeviceTest : public Test
|
class V4L2SubdeviceTest : public Test
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -30,9 +28,9 @@ protected:
|
||||||
int init() override;
|
int init() override;
|
||||||
void cleanup() override;
|
void cleanup() override;
|
||||||
|
|
||||||
std::unique_ptr<DeviceEnumerator> enumerator_;
|
std::unique_ptr<libcamera::DeviceEnumerator> enumerator_;
|
||||||
std::shared_ptr<MediaDevice> media_;
|
std::shared_ptr<libcamera::MediaDevice> media_;
|
||||||
V4L2Subdevice *scaler_;
|
libcamera::V4L2Subdevice *scaler_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_V4L2_SUBDEVICE_TEST_H__ */
|
#endif /* __LIBCAMERA_V4L2_SUBDEVICE_TEST_H__ */
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
|
|
||||||
#include "v4l2_videodevice_test.h"
|
#include "v4l2_videodevice_test.h"
|
||||||
|
|
||||||
|
using namespace libcamera;
|
||||||
|
|
||||||
class BufferSharingTest : public V4L2VideoDeviceTest
|
class BufferSharingTest : public V4L2VideoDeviceTest
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
|
|
||||||
#include "v4l2_videodevice_test.h"
|
#include "v4l2_videodevice_test.h"
|
||||||
|
|
||||||
|
using namespace libcamera;
|
||||||
|
|
||||||
class CaptureAsyncTest : public V4L2VideoDeviceTest
|
class CaptureAsyncTest : public V4L2VideoDeviceTest
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
|
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
using namespace libcamera;
|
|
||||||
|
|
||||||
class V4L2VideoDeviceTest : public Test
|
class V4L2VideoDeviceTest : public Test
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -36,12 +34,12 @@ protected:
|
||||||
|
|
||||||
std::string driver_;
|
std::string driver_;
|
||||||
std::string entity_;
|
std::string entity_;
|
||||||
std::unique_ptr<DeviceEnumerator> enumerator_;
|
std::unique_ptr<libcamera::DeviceEnumerator> enumerator_;
|
||||||
std::shared_ptr<MediaDevice> media_;
|
std::shared_ptr<libcamera::MediaDevice> media_;
|
||||||
CameraSensor *sensor_;
|
libcamera::CameraSensor *sensor_;
|
||||||
V4L2Subdevice *debayer_;
|
libcamera::V4L2Subdevice *debayer_;
|
||||||
V4L2VideoDevice *capture_;
|
libcamera::V4L2VideoDevice *capture_;
|
||||||
std::vector<std::unique_ptr<FrameBuffer>> buffers_;
|
std::vector<std::unique_ptr<libcamera::FrameBuffer>> buffers_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_V4L2_DEVICE_TEST_H_ */
|
#endif /* __LIBCAMERA_V4L2_DEVICE_TEST_H_ */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue