ipa: Add start() and stop() operations
Add two new operations to the IPA interface to start and stop it. The intention is that these functions shall be used by the IPA to perform actions when the camera is started and stopped. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
@@ -27,6 +27,8 @@ using namespace std;
|
||||
|
||||
enum Operation {
|
||||
Op_init,
|
||||
Op_start,
|
||||
Op_stop,
|
||||
Op_configure,
|
||||
Op_mapBuffers,
|
||||
Op_unmapBuffers,
|
||||
@@ -47,6 +49,17 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
int start() override
|
||||
{
|
||||
report(Op_start, TestPass);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void stop() override
|
||||
{
|
||||
report(Op_stop, TestPass);
|
||||
}
|
||||
|
||||
void configure(const std::map<unsigned int, IPAStream> &streamConfig,
|
||||
const std::map<unsigned int, const ControlInfoMap &> &entityControls) override
|
||||
{
|
||||
@@ -323,12 +336,26 @@ protected:
|
||||
return TestFail;
|
||||
|
||||
/*
|
||||
* Test init() last to ensure nothing in the wrappers or
|
||||
* serializer depends on init() being called first.
|
||||
* Test init(), start() and stop() last to ensure nothing in the
|
||||
* wrappers or serializer depends on them being called first.
|
||||
*/
|
||||
ret = INVOKE(init);
|
||||
if (ret == TestFail)
|
||||
if (ret == TestFail) {
|
||||
cerr << "Failed to run init()";
|
||||
return TestFail;
|
||||
}
|
||||
|
||||
ret = INVOKE(start);
|
||||
if (ret == TestFail) {
|
||||
cerr << "Failed to run start()";
|
||||
return TestFail;
|
||||
}
|
||||
|
||||
ret = INVOKE(stop);
|
||||
if (ret == TestFail) {
|
||||
cerr << "Failed to run stop()";
|
||||
return TestFail;
|
||||
}
|
||||
|
||||
return TestPass;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user