mirror of
https://gitee.com/jiuyilian/embedded-framework.git
synced 2025-01-06 10:16:51 -05:00
Backup.
This commit is contained in:
parent
70749f4612
commit
f5043e8efe
|
@ -37,7 +37,7 @@ bool TopState::ExecuteStateMsg(VStateMachineData *msg)
|
|||
}
|
||||
StatusCode TopState::ReportEvent(const MediaReportEvent &event)
|
||||
{
|
||||
LogInfo("==================================================================ReportEvent:\n");
|
||||
LogInfo(" ReportEvent:\n");
|
||||
std::shared_ptr<VMissionData> message = std::make_shared<VMissionDataV2<MediaReportEvent>>(
|
||||
static_cast<MissionEvent>(InternalStateEvent::MEDIA_REPORT_EVENT), event);
|
||||
MissionStateMachine::GetInstance()->SendStateMessage(message);
|
||||
|
|
|
@ -29,12 +29,12 @@ namespace MediaManager_Mock_Test
|
|||
TEST_F(HunttingCameraTest, INTEGRATION_HunttingCamera_EXAMPLE_MediaReprot)
|
||||
{
|
||||
SetAllCamerasResult(mAllCamerasMock);
|
||||
MockReportCameraEvent("/tmp/test.MP4", CameraType::MAIN_CAMERA);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
// McuManagerTestTool::MockMcuDeviceOpenFailed(mLinuxTest);
|
||||
MainThread::GetInstance()->Init();
|
||||
TestManager::ResetTimeOut(1000 * 3);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
MockReportCameraEvent("/tmp/test.MP4", "test path", CameraEvent::PICTIRUE, CameraType::MAIN_CAMERA);
|
||||
// MockAppPlayback();
|
||||
MainThread::GetInstance()->Runing();
|
||||
}
|
||||
|
|
|
@ -23,6 +23,9 @@ void CameraHalTest::SetCameraMonitor(std::shared_ptr<VCameraHalMonitor> &monitor
|
|||
LogInfo("CameraHalTest::SetCameraMonitor.\n");
|
||||
mMonitor = monitor;
|
||||
SetCameraMonitorTrace(monitor);
|
||||
if (nullptr != mFastBootEvent) {
|
||||
monitor->ReportEvent(*(mFastBootEvent.get()));
|
||||
}
|
||||
}
|
||||
void CameraHalTest::SetCameraMonitorTrace(std::shared_ptr<VCameraHalMonitor> &monitor)
|
||||
{
|
||||
|
@ -35,7 +38,8 @@ void CameraHalMock::MockReportCameraEvent(const CameraReportEvent &event)
|
|||
{
|
||||
auto monitor = mMonitor.lock();
|
||||
if (mMonitor.expired()) {
|
||||
LogError("monitor is nullptr.\n");
|
||||
LogWarning("monitor is nullptr.\n");
|
||||
mFastBootEvent = std::make_shared<CameraReportEvent>(event.mFileName, event.mCameraType);
|
||||
return;
|
||||
}
|
||||
monitor->ReportEvent(event);
|
||||
|
|
|
@ -29,6 +29,7 @@ private:
|
|||
protected:
|
||||
const CameraType mCameraType;
|
||||
std::weak_ptr<VCameraHalMonitor> mMonitor;
|
||||
std::shared_ptr<CameraReportEvent> mFastBootEvent;
|
||||
};
|
||||
class CameraHalMock : public CameraHalTest
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user