• Home
  • Raw
  • Download

Lines Matching refs:Test_

26     Test_ = std::make_shared<OHOS::Camera::Test>();  in SetUp()
27 Test_->Init(); in SetUp()
28 Test_->Open(); in SetUp()
32 Test_->Close(); in TearDown()
45 Test_->intents = {Camera::PREVIEW};
46 Test_->StartStream(Test_->intents);
48 Test_->StartCapture(Test_->streamId_preview, Test_->captureId_preview, false, true);
50 Test_->captureIds = {Test_->captureId_preview};
51 Test_->streamIds = {Test_->streamId_preview};
52 Test_->StopStream(Test_->captureIds, Test_->streamIds);
53 Test_->StopConsumer(Test_->intents);
67 Test_->CreateStreamOperatorCallback();
68Test_->rc = Test_->cameraDevice->GetStreamOperator(Test_->streamOperatorCallback, Test_->streamOpe…
69 EXPECT_EQ(Test_->rc, Camera::NO_ERROR);
71 Test_->streamInfo = std::make_shared<StreamInfo>();
72 Test_->streamInfo->streamId_ = Test_->streamId_preview;
73 Test_->streamInfo->width_ = 1280;
74 Test_->streamInfo->height_ = 960;
75 Test_->streamInfo->dataspace_ = 8;
76 Test_->StreamInfoFormat();
77 Test_->streamInfo->intent_ = Camera::PREVIEW;
81Test_->streamInfo->bufferQueue_ = preview_consumer->CreateProducer([this](OHOS::SurfaceBuffer* buf… in __anon98d3f5760102()
82 Test_->SaveYUV("preview", buffer->GetVirAddr(), buffer->GetSize()); in __anon98d3f5760102()
85Test_->streamInfo->bufferQueue_ = preview_consumer->CreateProducer([this](void* addr, uint32_t siz… in __anon98d3f5760202()
86 Test_->SaveYUV("preview", addr, size); in __anon98d3f5760202()
89 Test_->streamInfo->bufferQueue_->SetQueueSize(8);
90 Test_->consumerMap_[Camera::PREVIEW] = preview_consumer;
91 Test_->streamInfo->tunneledMode_ = 5;
92 std::vector<std::shared_ptr<StreamInfo>>().swap(Test_->streamInfos);
93 Test_->streamInfos.push_back(Test_->streamInfo);
94 Test_->rc = Test_->streamOperator->CreateStreams(Test_->streamInfos);
95 EXPECT_EQ(Test_->rc, Camera::NO_ERROR);
97 Test_->rc = Test_->streamOperator->CommitStreams(Camera::NORMAL, Test_->ability);
98 EXPECT_EQ(Test_->rc, Camera::NO_ERROR);
100 Test_->StartCapture(Test_->streamId_preview, Test_->captureId_preview, false, true);
102 Test_->captureIds = {Test_->captureId_preview};
103 Test_->streamIds = {Test_->streamId_preview};
104 Test_->StopStream(Test_->captureIds, Test_->streamIds);
105 Test_->StopConsumer(Test_->intents);
118 Test_->CreateStreamOperatorCallback();
119Test_->rc = Test_->cameraDevice->GetStreamOperator(Test_->streamOperatorCallback, Test_->streamOpe…
120 EXPECT_EQ(false, Test_->rc != Camera::NO_ERROR || Test_->streamOperator == nullptr);
133 Test_->rc = Test_->cameraDevice->GetStreamOperator(nullptr, Test_->streamOperator);
134 std::cout << "GetStreamOperator's rc " << Test_->rc << std::endl;
135 EXPECT_EQ(Camera::CamRetCode::INVALID_ARGUMENT, Test_->rc);
148 Test_->CreateStreamOperatorCallback();
149Test_->rc = Test_->cameraDevice->GetStreamOperator(Test_->streamOperatorCallback, Test_->streamOpe…
150 EXPECT_EQ(Test_->rc, Camera::NO_ERROR);
152 Test_->rc = Test_->streamOperator->CommitStreams(Camera::NORMAL, nullptr);
153 EXPECT_EQ(true, Test_->rc == INVALID_ARGUMENT);
166 Test_->CreateStreamOperatorCallback();
167Test_->rc = Test_->cameraDevice->GetStreamOperator(Test_->streamOperatorCallback, Test_->streamOpe…
168 EXPECT_EQ(Test_->rc, Camera::NO_ERROR);
170 Test_->rc = Test_->streamOperator->CommitStreams(Camera::NORMAL, Test_->ability);
171 std::cout << "streamOperator->CommitStreams's rc " << Test_->rc << std::endl;
172 EXPECT_EQ(true, Test_->rc == INVALID_ARGUMENT);
185 Test_->intents = {Camera::PREVIEW};
186 Test_->StartStream(Test_->intents);
188 Test_->StartCapture(Test_->streamId_preview, Test_->captureId_preview, false, true);
190 Test_->captureIds = {Test_->captureId_preview};
191 Test_->streamIds = {Test_->streamId_preview};
192 Test_->StopStream(Test_->captureIds, Test_->streamIds);
193 Test_->StopConsumer(Test_->intents);
206 Test_->CreateStreamOperatorCallback();
207Test_->rc = Test_->cameraDevice->GetStreamOperator(Test_->streamOperatorCallback, Test_->streamOpe…
208 EXPECT_EQ(false, Test_->rc != Camera::NO_ERROR || Test_->streamOperator == nullptr);
209 Test_->streamInfo = std::make_shared<StreamInfo>();
210 Test_->rc = Test_->streamOperator->ReleaseStreams({9999});
211 std::cout << "streamOperator->ReleaseStreams's rc " << Test_->rc << std::endl;
212 EXPECT_EQ(true, Test_->rc == Camera::NO_ERROR);
225 Test_->intents = {Camera::PREVIEW};
226 Test_->StartStream(Test_->intents);
229 Test_->rc = Test_->streamOperator->CancelCapture(captureId);
230 EXPECT_EQ(true, Test_->rc == Camera::INVALID_ARGUMENT);
231 if (Test_->rc == Camera::NO_ERROR) {
234 std::cout << "==========[test log]CancelCapture fail, rc = " << Test_->rc << std::endl;
237 Test_->rc = Test_->streamOperator->ReleaseStreams({Test_->streamId_preview});
238 EXPECT_EQ(Test_->rc, Camera::NO_ERROR);
239 if (Test_->rc == Camera::NO_ERROR) {
242 std::cout << "==========[test log]ReleaseStreams fail, rc = " << Test_->rc << std::endl;
256 Test_->intents = {Camera::PREVIEW};
257 Test_->StartStream(Test_->intents);
259 Test_->rc = Test_->streamOperator->ReleaseStreams({Test_->streamId_preview});
260 EXPECT_EQ(Test_->rc, Camera::NO_ERROR);
261 if (Test_->rc == Camera::NO_ERROR) {
264 std::cout << "==========[test log]ReleaseStreams fail, rc = " << Test_->rc << std::endl;
269 Test_->captureInfo = std::make_shared<CaptureInfo>();
270 Test_->captureInfo->streamIds_ = {Test_->streamId_preview};
271 Test_->captureInfo->captureSetting_ = Test_->ability;
272 Test_->captureInfo->enableShutterCallback_ = false;
274 Test_->rc = Test_->streamOperator->Capture(captureId, Test_->captureInfo, isStreaming);
275 EXPECT_EQ(Test_->rc, Camera::INVALID_ARGUMENT);
277 Test_->cameraDevice->Close();
291 Test_->intents = {Camera::PREVIEW};
292 Test_->StartStream(Test_->intents);
294 Test_->captureInfo = std::make_shared<Camera::CaptureInfo>();
295 Test_->captureInfo->streamIds_ = {Test_->streamId_preview};
296 Test_->captureInfo->captureSetting_ = Test_->ability;
297 Test_->captureInfo->enableShutterCallback_ = true;
299 Test_->rc = Test_->streamOperator->Capture(Test_->captureId_preview, Test_->captureInfo, true);
300 EXPECT_EQ(true, Test_->rc == Camera::NO_ERROR);
301 if (Test_->rc == Camera::NO_ERROR) {
302 …std::cout << "==========[test log]check Capture: Capture success, " << Test_->captureId_preview <<…
304 … std::cout << "==========[test log]check Capture: Capture fail, rc = " << Test_->rc << std::endl;
308 Test_->rc = Test_->streamOperator->Capture(Test_->captureId_preview, Test_->captureInfo, true);
309 EXPECT_EQ(false, Test_->rc == Camera::NO_ERROR);
310 if (Test_->rc == Camera::NO_ERROR) {
311 …std::cout << "==========[test log]check Capture: Capture success, " << Test_->captureId_preview <<…
313 … std::cout << "==========[test log]check Capture: Capture fail, rc = " << Test_->rc << std::endl;
316 Test_->rc = Test_->streamOperator->CancelCapture(Test_->captureId_preview);
317 EXPECT_EQ(true, Test_->rc == Camera::NO_ERROR);
318 if (Test_->rc == Camera::NO_ERROR) {
319 …std::cout << "======[test log]check Capture: CancelCapture success," << Test_->captureId_preview <…
321 …std::cout << "==========[test log]check Capture: CancelCapture fail, rc = " << Test_->rc << std::e…
322 std::cout << "captureId = " << Test_->captureId_preview << std::endl;
325 Test_->streamIds = {Test_->streamId_preview};
326 std::cout << "Test_->streamIds size = " << Test_->streamIds.size() << std::endl;
327 Test_->rc = Test_->streamOperator->ReleaseStreams(Test_->streamIds);
328 if (Test_->rc == Camera::NO_ERROR) {
331 …std::cout << "==========[test log]check Capture: ReleaseStreams fail, rc = " << Test_->rc << std::…
333 EXPECT_EQ(true, Test_->rc == Camera::NO_ERROR);
346 Test_->intents = {Camera::PREVIEW};
347 Test_->StartStream(Test_->intents);
349 Test_->StartCapture(Test_->streamId_preview, Test_->captureId_preview, false, false);
350 Test_->StartCapture(Test_->streamId_preview, Test_->captureId_capture, false, false);
352 Test_->captureIds = {};
353 Test_->streamIds = {Test_->streamId_preview};
354 Test_->StopStream(Test_->captureIds, Test_->streamIds);
355 Test_->StopConsumer(Test_->intents);