TEST_F(VisionV4L2, ListDevices)
{
- vision_source_device_info_s *dev_list;
+ const vision_source_device_info_s *dev_list;
int dev_cnt;
ASSERT_EQ(vision_source_list_devices(ms_handle, &dev_list, &dev_cnt), VISION_SOURCE_ERROR_NONE);
EXPECT_GT(dev_cnt, 0);
TEST_F(VisionV4L2, DevCap)
{
- vision_source_device_info_s *dev_list;
- media_format_h *fmt_list;
+ const vision_source_device_info_s *dev_list;
+ const media_format_h *fmt_list;
int fmt_count;
int dev_cnt;
ASSERT_EQ(vision_source_list_devices(ms_handle, &dev_list, &dev_cnt), VISION_SOURCE_ERROR_NONE);
ASSERT_GT(dev_cnt, 0);
- ASSERT_EQ(vision_source_get_device_cap(ms_handle, 0, &fmt_list, &fmt_count), VISION_SOURCE_ERROR_NONE);
+ ASSERT_EQ(vision_source_list_device_caps(ms_handle, 0, &fmt_list, &fmt_count), VISION_SOURCE_ERROR_NONE);
ASSERT_GT(fmt_count, 0);
}
TEST_F(VisionV4L2, NotOpenDev)
{
- vision_source_device_info_s *dev_list;
- media_format_h *fmt_list;
+ const vision_source_device_info_s *dev_list;
+ const media_format_h *fmt_list;
int fmt_count;
int dev_cnt;
ASSERT_EQ(vision_source_list_devices(ms_handle, &dev_list, &dev_cnt), VISION_SOURCE_ERROR_NONE);
ASSERT_GT(dev_cnt, 0);
- ASSERT_EQ(vision_source_get_device_cap(ms_handle, 0, &fmt_list, &fmt_count), VISION_SOURCE_ERROR_NONE);
+ ASSERT_EQ(vision_source_list_device_caps(ms_handle, 0, &fmt_list, &fmt_count), VISION_SOURCE_ERROR_NONE);
ASSERT_GT(fmt_count, 2);
EXPECT_EQ(vision_source_set_stream_format(ms_handle, fmt_list[2]), VISION_SOURCE_ERROR_INVALID_OPERATION);
}
TEST_F(VisionV4L2, SetStream)
{
- vision_source_device_info_s *dev_list;
- media_format_h *fmt_list;
+ const vision_source_device_info_s *dev_list;
+ const media_format_h *fmt_list;
int fmt_count;
int dev_cnt;
ASSERT_EQ(vision_source_list_devices(ms_handle, &dev_list, &dev_cnt), VISION_SOURCE_ERROR_NONE);
ASSERT_GT(dev_cnt, 0);
- ASSERT_EQ(vision_source_get_device_cap(ms_handle, 0, &fmt_list, &fmt_count), VISION_SOURCE_ERROR_NONE);
+ ASSERT_EQ(vision_source_list_device_caps(ms_handle, 0, &fmt_list, &fmt_count), VISION_SOURCE_ERROR_NONE);
ASSERT_GT(fmt_count, 2);
ASSERT_EQ(vision_source_open_device(ms_handle, 0), VISION_SOURCE_ERROR_NONE);
EXPECT_EQ(vision_source_set_stream_format(ms_handle, fmt_list[2]), VISION_SOURCE_ERROR_NONE);
void SetUp() override
{
ASSERT_EQ(vision_source_init(&ms_handle), VISION_SOURCE_ERROR_NONE);
- vision_source_device_info_s *dev_list;
- media_format_h *fmt_list;
+ const vision_source_device_info_s *dev_list;
+ const media_format_h *fmt_list;
int fmt_count;
int dev_cnt;
ASSERT_EQ(vision_source_list_devices(ms_handle, &dev_list, &dev_cnt), VISION_SOURCE_ERROR_NONE);
ASSERT_GT(dev_cnt, 0);
- ASSERT_EQ(vision_source_get_device_cap(ms_handle, 0, &fmt_list, &fmt_count), VISION_SOURCE_ERROR_NONE);
+ ASSERT_EQ(vision_source_list_device_caps(ms_handle, 0, &fmt_list, &fmt_count), VISION_SOURCE_ERROR_NONE);
ASSERT_GT(fmt_count, 2);
ASSERT_EQ(vision_source_open_device(ms_handle, 0), VISION_SOURCE_ERROR_NONE);