Commit 6fc9265d authored by Samuel Debionne's avatar Samuel Debionne

Merge branch '2-python3-interface-ctor' into 'master'

Resolve "python3 interface ctor"

Closes #2

See merge request !3
parents 92659449 8cec1388
Pipeline #7870 passed with stages
in 7 minutes and 39 seconds
...@@ -109,6 +109,7 @@ add_library(v4l2 SHARED ...@@ -109,6 +109,7 @@ add_library(v4l2 SHARED
generate_export_header(v4l2) generate_export_header(v4l2)
# Set version # Set version
set_target_properties(v4l2 PROPERTIES set_target_properties(v4l2 PROPERTIES
OUTPUT_NAME "lima${PROJECT_NAME_LOWER}"
VERSION "${PROJECT_VERSION}" VERSION "${PROJECT_VERSION}"
SOVERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}") SOVERSION "${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}")
......
...@@ -35,7 +35,7 @@ namespace lima ...@@ -35,7 +35,7 @@ namespace lima
{ {
DEB_CLASS_NAMESPC(DebModCamera, "Interface", "V4L2"); DEB_CLASS_NAMESPC(DebModCamera, "Interface", "V4L2");
public: public:
Interface(const char* dev_path = "/dev/video0"); Interface(const std::string& dev_path = "/dev/video0");
virtual ~Interface(); virtual ~Interface();
virtual void getCapList(CapList &) const; virtual void getCapList(CapList &) const;
......
...@@ -28,7 +28,7 @@ namespace V4L2 ...@@ -28,7 +28,7 @@ namespace V4L2
#include <V4L2Interface.h> #include <V4L2Interface.h>
%End %End
public: public:
Interface(const char* dev_path = "/dev/video0"); Interface(const std::string& dev_path = "/dev/video0");
virtual ~Interface(); virtual ~Interface();
virtual void getCapList(std::vector<HwCap> &cap_list /Out/) const; virtual void getCapList(std::vector<HwCap> &cap_list /Out/) const;
......
...@@ -31,11 +31,11 @@ ...@@ -31,11 +31,11 @@
using namespace lima; using namespace lima;
using namespace lima::V4L2; using namespace lima::V4L2;
Interface::Interface(const char* dev_path) Interface::Interface(const std::string& dev_path)
{ {
DEB_CONSTRUCTOR(); DEB_CONSTRUCTOR();
m_fd = v4l2_open(dev_path,O_RDWR); m_fd = v4l2_open(dev_path.c_str(),O_RDWR);
if(m_fd < -1) if(m_fd < -1)
THROW_HW_ERROR(Error) << "Error opening: " << dev_path THROW_HW_ERROR(Error) << "Error opening: " << dev_path
<< "(" << strerror(errno) << ")"; << "(" << strerror(errno) << ")";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment