Commit 7b45cad7 authored by Damien Naudet's avatar Damien Naudet

Some code modification to make it compile. Needs some testing!

parent 52b0c1e8
......@@ -66,6 +66,7 @@ namespace lima
void stopAcq();
void getStatus(HwInterface::StatusType& status);
int getNbHwAcquiredFrames();
int getV4l2Fd() { return m_fd; }
private:
class _AcqThread;
friend class _AcqThread;
......
......@@ -55,6 +55,9 @@ namespace lima
SyncCtrlObj* m_sync;
Camera* m_cam;
_Callback* m_cbk;
CapList m_cap_list;
SoftBufferCtrlObj m_buffer_ctrl_obj;
};
}
}
......
......@@ -31,8 +31,8 @@ from Lima import Core
cleanup_data = module_helper.load_dep_cleanup(cleanup_data)
from Lima.Tutorial.limatutorial import Tutorial as _Tuto
globals().update(_Tuto.__dict__)
from Lima.v4l2.limav4l2 import V4L2 as _V4l2
globals().update(_V4l2.__dict__)
module_helper.load_cleanup(cleanup_data)
......
......@@ -19,12 +19,12 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, see <http://www.gnu.org/licenses/>.
//###########################################################################
namespace Tutorial
namespace V4L2
{
class Camera
{
%TypeHeaderCode
#include <TutorialCamera.h>
#include <V4L2Camera.h>
%End
public:
class Callback
......
......@@ -20,12 +20,12 @@
// along with this program; if not, see <http://www.gnu.org/licenses/>.
//###########################################################################
namespace Tutorial
namespace V4L2
{
class Interface : HwInterface
{
%TypeHeaderCode
#include <TutorialInterface.h>
#include <V4L2Interface.h>
%End
public:
Interface(const char* dev_path = "/dev/video0");
......
......@@ -54,8 +54,12 @@ Interface::Interface(const char* dev_path)
DEB_CONSTRUCTOR();
m_cbk = new _Callback(*this);
m_cam = new Camera(m_cbk,dev_path);
m_det_info = new DetInfoCtrlObj(*m_cam);
m_sync = new SyncCtrlObj(*m_cam);
m_det_info = new DetInfoCtrlObj(m_cam->getV4l2Fd());
m_sync = new SyncCtrlObj(m_cam->getV4l2Fd());
m_cap_list.push_back(HwCap(m_sync));
m_cap_list.push_back(HwCap(m_det_info));
m_cap_list.push_back(HwCap(&m_buffer_ctrl_obj));
}
Interface::~Interface()
......@@ -70,10 +74,7 @@ Interface::~Interface()
void Interface::getCapList(CapList &cap_list) const
{
DEB_MEMBER_FUNCT();
cap_list.push_back(HwCap(m_sync));
cap_list.push_back(HwCap(m_det_info));
cap_list.push_back(HwCap(&m_buffer_ctrl_obj));
cap_list = m_cap_list;
}
void Interface::reset(ResetLevel reset_level)
......
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