• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include "dcamera_provider.h"
17 #include "dcamera_provider_callback_impl.h"
18 #include "dcameraprovidercase.h"
19 #include "dcameratest.h"
20 #include <gtest/gtest.h>
21 
22 using namespace testing::ext;
23 
24 namespace OHOS {
25 namespace DistributedHardware {
26 class DCameraProviderTest : public testing::Test {
27 public:
28     static void SetUpTestCase(void);
29     static void TearDownTestCase(void);
30     void SetUp();
31     void TearDown();
32 
33     std::shared_ptr<DCameraSourceDev> camDev_;
34     std::shared_ptr<ICameraStateListener> stateListener_;
35     sptr<IDCameraProviderCallback> hdiCallback_;
36 };
37 
38 namespace {
39 const std::string testDeviceId = "bb536a637105409e904d4da83790a4a7";
40 const std::string testCameraDh = "camera_0";
41 const std::string testReqId = "0xFFFF";
42 const std::string testParam = R"({"CodecType": ["avenc_mpeg4"],
43     "OutputFormat": {"Photo":[4], "Preview":[2, 3], "Video":[2, 3]},
44     "Position": "BACK",
45     "ProtocolVer": "1.0",
46     "MetaData": "",
47     "Resolution": {
48     "2": ["1920*1080", "1504*720", "1440*1080", "1280*960", "1280*720", "1232*768", "1152*720", "960*720", "960*544",
49     "880*720", "720*720", "720*480", "640*480", "352*288", "320*240"],
50     "3": ["1920*1080", "1504*720", "1440*1080", "1280*960", "1280*720", "1232*768", "1152*720", "960*720", "960*544",
51     "880*720", "720*720", "720*480", "640*480", "352*288", "320*240"],
52     "4": ["3840*2160", "3264*2448", "3264*1840", "2304*1728", "2048*1536", "1920*1440", "1920*1080", "1744*1088",
53     "1280*720", "1232*768", "1152*720", "640*480", "320*240"]}})";
54 const int32_t TEST_WIDTH = 1920;
55 const int32_t TEST_HEIGTH = 1080;
56 const int32_t TEST_STREAMID = 2;
57 const std::string TEST_CONTENT = "test add";
58 } // namespace
59 
60 std::vector<DCStreamInfo> streamInfos;
61 std::vector<DCStreamInfo> streamInfos1;
62 std::vector<DCStreamInfo> streamInfos2;
63 std::vector<DCStreamInfo> streamInfos3;
64 std::vector<DCStreamInfo> streamInfos4;
65 std::vector<DCCaptureInfo> captureInfos;
66 std::vector<DCCaptureInfo> captureInfos1;
67 std::vector<DCCaptureInfo> captureInfos2;
68 std::vector<DCameraSettings> settings;
69 std::vector<int> streamIds;
70 DCameraSettings result;
71 DCameraSettings result1;
72 DCameraSettings result2;
73 DCameraSettings result3;
74 DCameraSettings result4;
75 DCameraSettings result5;
76 DCameraSettings result6;
77 DCStreamInfo streamInfo2;
78 DCStreamInfo streamInfo3;
79 DCStreamInfo streamInfo4;
80 DCStreamInfo streamInfo5;
81 DCCaptureInfo captureInfo2;
82 DCCaptureInfo captureInfo3;
83 DHBase dhBase;
84 DHBase dhBaseTest;
85 DCameraProvider cameraProvider;
86 DCameraBuffer buffer;
87 DCameraHDFEvent hdiEvent;
88 
SetUpTestCase(void)89 void DCameraProviderTest::SetUpTestCase(void)
90 {
91     dhBase.deviceId_ = testDeviceId;
92     dhBase.dhId_ = testCameraDh;
93 
94     hdiEvent.type_ = 0;
95     hdiEvent.result_ = 1;
96     hdiEvent.content_ = TEST_CONTENT;
97 
98     result.type_ = METADATA_RESULT;
99     result.value_ = "SettingValue";
100 
101     DCStreamInfo streamInfo1;
102     streamInfo1.streamId_ = 1;
103     streamInfo1.width_ = TEST_WIDTH;
104     streamInfo1.height_ = TEST_HEIGTH;
105     streamInfo1.stride_ = 1;
106     streamInfo1.format_ = 1;
107     streamInfo1.dataspace_ = 1;
108     streamInfo1.encodeType_ = ENCODE_TYPE_JPEG;
109     streamInfo1.type_ = SNAPSHOT_FRAME;
110     streamInfos.push_back(streamInfo1);
111 
112     streamIds.push_back(1);
113     streamIds.push_back(TEST_STREAMID);
114 
115     DCCaptureInfo captureInfo1;
116     captureInfo1.streamIds_.push_back(1);
117     captureInfo1.width_ = TEST_WIDTH;
118     captureInfo1.height_ = TEST_HEIGTH;
119     captureInfo1.stride_ = 1;
120     captureInfo1.format_ = 1;
121     captureInfo1.dataspace_ = 1;
122     captureInfo1.encodeType_ = ENCODE_TYPE_H265;
123     captureInfo1.type_ = CONTINUOUS_FRAME;
124     captureInfos.push_back(captureInfo1);
125 
126     settings.push_back(result);
127 }
128 
TearDownTestCase(void)129 void DCameraProviderTest::TearDownTestCase(void) {}
130 
SetUp(void)131 void DCameraProviderTest::SetUp(void)
132 {
133     stateListener_ = std::make_shared<HdiDCameraSourceStateListener>();
134     camDev_ = std::make_shared<HdiDCameraSourceDev>(testDeviceId, testCameraDh, stateListener_);
135     hdiCallback_ = new (std::nothrow) DCameraProviderCallbackImpl(testDeviceId, testCameraDh, camDev_);
136 }
137 
TearDown(void)138 void DCameraProviderTest::TearDown(void)
139 {
140     hdiCallback_ = nullptr;
141     camDev_ = nullptr;
142     stateListener_ = nullptr;
143     dhBase.deviceId_.clear();
144     dhBase.dhId_.clear();
145 }
146 
147 /**
148  * @tc.number : SUB_DH_Dcamera_HDI_EnableDCameraDevice_0200
149  * @tc.name   : testDCameraEnableDCameraDevice001
150  * @tc.desc   : EnableDCameraDevice, dhBase.deviceId_ = "", return invalid_argument
151  */
152 HWTEST_F(DCameraProviderTest, testDCameraEnableDCameraDevice001, Function | MediumTest | Level2)
153 {
154     dhBase.deviceId_ = "";
155     dhBase.dhId_ = testCameraDh;
156     int32_t ret = cameraProvider.EnableDCameraDevice(dhBase, testParam, hdiCallback_);
157     EXPECT_EQ(INVALID_ARGUMENT, ret);
158 }
159 
160 /**
161  * @tc.number : SUB_DH_Dcamera_HDI_EnableDCameraDevice_0300
162  * @tc.name   : testDCameraEnableDCameraDevice002
163  * @tc.desc   : EnableDCameraDevice, dhBase.dhId_ = "", return invalid_argument
164  */
165 HWTEST_F(DCameraProviderTest, testDCameraEnableDCameraDevice002, Function | MediumTest | Level2)
166 {
167     dhBase.deviceId_ = testDeviceId;
168     dhBase.dhId_ = "";
169     int32_t ret = cameraProvider.EnableDCameraDevice(dhBase, testParam, hdiCallback_);
170     EXPECT_EQ(INVALID_ARGUMENT, ret);
171 }
172 
173 /**
174  * @tc.number : SUB_DH_Dcamera_HDI_EnableDCameraDevice_0400
175  * @tc.name   : testDCameraEnableDCameraDevice003
176  * @tc.desc   : EnableDCameraDevice, testParam = "", return invalid_argument
177  */
178 HWTEST_F(DCameraProviderTest, testDCameraEnableDCameraDevice003, Function | MediumTest | Level2)
179 {
180     dhBase.deviceId_ = testDeviceId;
181     dhBase.dhId_ = testCameraDh;
182     std::string testParamNull = "";
183     int32_t ret = cameraProvider.EnableDCameraDevice(dhBase, testParamNull, hdiCallback_);
184     EXPECT_EQ(INVALID_ARGUMENT, ret);
185 }
186 
187 /**
188  * @tc.number : SUB_DH_Dcamera_HDI_EnableDCameraDevice_0500
189  * @tc.name   : testDCameraEnableDCameraDevice004
190  * @tc.desc   : EnableDCameraDevice, hdiCallback_ = nullptr, return invalid_argument
191  */
192 HWTEST_F(DCameraProviderTest, testDCameraEnableDCameraDevice004, Function | MediumTest | Level2)
193 {
194     dhBase.deviceId_ = testDeviceId;
195     dhBase.dhId_ = testCameraDh;
196     int32_t ret = cameraProvider.EnableDCameraDevice(dhBase, testParam, nullptr);
197     EXPECT_EQ(INVALID_ARGUMENT, ret);
198 }
199 
200 /**
201  * @tc.number : SUB_DH_Dcamera_HDI_DisableDCameraDevice_0200
202  * @tc.name   : testDCameraDisableDCameraDevice001
203  * @tc.desc   : DisableDCameraDevice, dhBase.deviceId_ = "", return invalid_argument
204  */
205 HWTEST_F(DCameraProviderTest, testDCameraDisableDCameraDevice001, Function | MediumTest | Level2)
206 {
207     dhBase.deviceId_.clear();
208     dhBase.dhId_ = testCameraDh;
209     int32_t ret = cameraProvider.DisableDCameraDevice(dhBase);
210     EXPECT_EQ(INVALID_ARGUMENT, ret);
211 }
212 
213 /**
214  * @tc.number : SUB_DH_Dcamera_HDI_DisableDCameraDevice_0300
215  * @tc.name   : testDCameraDisableDCameraDevice002
216  * @tc.desc   : DisableDCameraDevice, dhBase.dhId_ = "", return invalid_argument
217  */
218 HWTEST_F(DCameraProviderTest, testDCameraDisableDCameraDevice002, Function | MediumTest | Level2)
219 {
220     dhBase.deviceId_ = testDeviceId;
221     dhBase.dhId_.clear();
222     int32_t ret = cameraProvider.DisableDCameraDevice(dhBase);
223     EXPECT_EQ(INVALID_ARGUMENT, ret);
224 }
225 
226 /**
227  * @tc.number : SUB_DH_Dcamera_HDI_AcquireBuffer_0300
228  * @tc.name   : testDCameraAcquireBuffer001
229  * @tc.desc   : AcquireBuffer, dhBase.deviceId_ = "", return invalid_argument
230  */
231 HWTEST_F(DCameraProviderTest, testDCameraAcquireBuffer001, Function | MediumTest | Level2)
232 {
233     dhBase.deviceId_.clear();
234     dhBase.dhId_ = testCameraDh;
235     int32_t ret = cameraProvider.AcquireBuffer(dhBase, TEST_STREAMID, buffer);
236     EXPECT_EQ(INVALID_ARGUMENT, ret);
237 }
238 
239 /**
240  * @tc.number : SUB_DH_Dcamera_HDI_AcquireBuffer_0400
241  * @tc.name   : testDCameraAcquireBuffer002
242  * @tc.desc   : AcquireBuffer, dhBase.dhId_ = "", return invalid_argument
243  */
244 HWTEST_F(DCameraProviderTest, testDCameraAcquireBuffer002, Function | MediumTest | Level2)
245 {
246     dhBase.deviceId_ = testDeviceId;
247     dhBase.dhId_.clear();
248     int32_t ret = cameraProvider.AcquireBuffer(dhBase, TEST_STREAMID, buffer);
249     EXPECT_EQ(INVALID_ARGUMENT, ret);
250 }
251 
252 /**
253  * @tc.number : SUB_DH_Dcamera_HDI_AcquireBuffer_0500
254  * @tc.name   : testDCameraAcquireBuffer003
255  * @tc.desc   : AcquireBuffer, TEST_STREAMID = -1, return invalid_argument
256  */
257 HWTEST_F(DCameraProviderTest, testDCameraAcquireBuffer003, Function | MediumTest | Level2)
258 {
259     dhBase.deviceId_ = testDeviceId;
260     dhBase.dhId_ = testCameraDh;
261     int32_t ret = cameraProvider.AcquireBuffer(dhBase, -1, buffer);
262     EXPECT_EQ(INVALID_ARGUMENT, ret);
263 }
264 
265 /**
266  * @tc.number : SUB_DH_Dcamera_HDI_AcquireBuffer_0600
267  * @tc.name   : testDCameraAcquireBuffer004
268  * @tc.desc   : AcquireBuffer, TEST_STREAMID = 2147483647, return invalid_argument
269  */
270 HWTEST_F(DCameraProviderTest, testDCameraAcquireBuffer004, Function | MediumTest | Level2)
271 {
272     dhBase.deviceId_ = testDeviceId;
273     dhBase.dhId_ = testCameraDh;
274     int32_t ret = cameraProvider.AcquireBuffer(dhBase, 2147483647, buffer);
275     EXPECT_EQ(INVALID_ARGUMENT, ret);
276 }
277 
278 /**
279  * @tc.number : SUB_DH_Dcamera_HDI_AcquireBuffer_0700
280  * @tc.name   : testDCameraAcquireBuffer005
281  * @tc.desc   : AcquireBuffer, TEST_STREAMID = 0, return invalid_argument
282  */
283 HWTEST_F(DCameraProviderTest, testDCameraAcquireBuffer005, Function | MediumTest | Level2)
284 {
285     dhBase.deviceId_ = testDeviceId;
286     dhBase.dhId_ = testCameraDh;
287     int32_t ret = cameraProvider.AcquireBuffer(dhBase, 0, buffer);
288     EXPECT_EQ(INVALID_ARGUMENT, ret);
289 }
290 
291 /**
292  * @tc.number : SUB_DH_Dcamera_HDI_ShutterBuffer_0300
293  * @tc.name   : testDCameraShutterBuffer001
294  * @tc.desc   : ShutterBuffer, hBase.deviceId_ = "", return invalid_argument
295  */
296 HWTEST_F(DCameraProviderTest, testDCameraShutterBuffer001, Function | MediumTest | Level2)
297 {
298     dhBase.deviceId_.clear();
299     dhBase.dhId_ = testCameraDh;
300     int32_t ret = cameraProvider.ShutterBuffer(dhBase, TEST_STREAMID, buffer);
301     EXPECT_EQ(INVALID_ARGUMENT, ret);
302 }
303 
304 /**
305  * @tc.number : SUB_DH_Dcamera_HDI_ShutterBuffer_0400
306  * @tc.name   : testDCameraShutterBuffer002
307  * @tc.desc   : ShutterBuffer, hBase.dhId_ = "", return invalid_argument
308  */
309 HWTEST_F(DCameraProviderTest, testDCameraShutterBuffer002, Function | MediumTest | Level2)
310 {
311     dhBase.deviceId_ = testDeviceId;
312     dhBase.dhId_.clear();
313     int32_t ret = cameraProvider.ShutterBuffer(dhBase, TEST_STREAMID, buffer);
314     EXPECT_EQ(INVALID_ARGUMENT, ret);
315 }
316 
317 /**
318  * @tc.number : SUB_DH_Dcamera_HDI_ShutterBuffer_0500
319  * @tc.name   : testDCameraShutterBuffer003
320  * @tc.desc   : ShutterBuffer, TEST_STREAMID = -1, return invalid_argument
321  */
322 HWTEST_F(DCameraProviderTest, testDCameraShutterBuffer003, Function | MediumTest | Level2)
323 {
324     dhBase.deviceId_ = testDeviceId;
325     dhBase.dhId_ = testCameraDh;
326     int32_t ret = cameraProvider.ShutterBuffer(dhBase, -1, buffer);
327     EXPECT_EQ(INVALID_ARGUMENT, ret);
328 }
329 
330 /**
331  * @tc.number : SUB_DH_Dcamera_HDI_ShutterBuffer_0600
332  * @tc.name   : testDCameraShutterBuffer004
333  * @tc.desc   : ShutterBuffer, TEST_STREAMID = 2147483647, return invalid_argument
334  */
335 HWTEST_F(DCameraProviderTest, testDCameraShutterBuffer004, Function | MediumTest | Level2)
336 {
337     dhBase.deviceId_ = testDeviceId;
338     dhBase.dhId_ = testCameraDh;
339     int32_t ret = cameraProvider.ShutterBuffer(dhBase, 2147483647, buffer);
340     EXPECT_EQ(INVALID_ARGUMENT, ret);
341 }
342 
343 /**
344  * @tc.number : SUB_DH_Dcamera_HDI_ShutterBuffer_0700
345  * @tc.name   : testDCameraShutterBuffer005
346  * @tc.desc   : ShutterBuffer, TEST_STREAMID = 0, return invalid_argument
347  */
348 HWTEST_F(DCameraProviderTest, testDCameraShutterBuffer005, Function | MediumTest | Level2)
349 {
350     dhBase.deviceId_ = testDeviceId;
351     dhBase.dhId_ = testCameraDh;
352     int32_t ret = cameraProvider.ShutterBuffer(dhBase, 0, buffer);
353     EXPECT_EQ(INVALID_ARGUMENT, ret);
354 }
355 
356 /**
357  * @tc.number : SUB_DH_Dcamera_HDI_OnSettingsResult_0900
358  * @tc.name   : testDCameraOnSettingsResult001
359  * @tc.desc   : OnSettingsResult, dhBase.deviceId_ = "", return invalid_argument
360  */
361 HWTEST_F(DCameraProviderTest, testDCameraOnSettingsResult001, Function | MediumTest | Level2)
362 {
363     dhBase.deviceId_.clear();
364     dhBase.dhId_ = testCameraDh;
365     int32_t ret = cameraProvider.OnSettingsResult(dhBase, result);
366     EXPECT_EQ(INVALID_ARGUMENT, ret);
367 }
368 
369 /**
370  * @tc.number : SUB_DH_Dcamera_HDI_OnSettingsResult_1000
371  * @tc.name   : testDCameraOnSettingsResult002
372  * @tc.desc   : OnSettingsResult, dhBase.dhId_ = "", return invalid_argument
373  */
374 HWTEST_F(DCameraProviderTest, testDCameraOnSettingsResult002, Function | MediumTest | Level2)
375 {
376     dhBase.deviceId_ = testDeviceId;
377     dhBase.dhId_.clear();
378     int32_t ret = cameraProvider.OnSettingsResult(dhBase, result);
379     EXPECT_EQ(INVALID_ARGUMENT, ret);
380 }
381 
382 /**
383  * @tc.number : SUB_DH_Dcamera_HDI_OnSettingsResult_1100
384  * @tc.name   : testDCameraOnSettingsResult003
385  * @tc.desc   : OnSettingsResult, result.value_ = "", return invalid_argument
386  */
387 HWTEST_F(DCameraProviderTest, testDCameraOnSettingsResult003, Function | MediumTest | Level2)
388 {
389     dhBase.deviceId_ = testDeviceId;
390     dhBase.dhId_ = testCameraDh;
391     result.value_ = "";
392     int32_t ret = cameraProvider.OnSettingsResult(dhBase, result);
393     EXPECT_EQ(INVALID_ARGUMENT, ret);
394 }
395 
396 /**
397  * @tc.number : SUB_DH_Dcamera_HDI_Notify_0300
398  * @tc.name   : testDCameraNotify001
399  * @tc.desc   : Notify, hBase.deviceId_ = "", return invalid_argument
400  */
401 HWTEST_F(DCameraProviderTest, testDCameraNotify001, Function | MediumTest | Level2)
402 {
403     dhBase.deviceId_.clear();
404     dhBase.dhId_ = testCameraDh;
405     int32_t ret = cameraProvider.Notify(dhBase, hdiEvent);
406     EXPECT_EQ(INVALID_ARGUMENT, ret);
407 }
408 
409 /**
410  * @tc.number : SUB_DH_Dcamera_HDI_Notify_0400
411  * @tc.name   : testDCameraNotify002
412  * @tc.desc   : Notify, dhBase.dhId_ = "", return invalid_argument
413  */
414 HWTEST_F(DCameraProviderTest, testDCameraNotify002, Function | MediumTest | Level2)
415 {
416     dhBase.deviceId_ = testDeviceId;
417     dhBase.dhId_.clear();
418     int32_t ret = cameraProvider.Notify(dhBase, hdiEvent);
419     EXPECT_EQ(INVALID_ARGUMENT, ret);
420 }
421 
422 /**
423  * @tc.number: SUB_DH_Dcamera_HDI_OpenSession_0300
424  * @tc.name: testDistributedCameraOpenSession001
425  * @tc.desc: OpenSession, dhBase.dhId_ = ""
426  */
427 HWTEST_F(DCameraProviderTest, testDistributedCameraOpenSession001, Function | MediumTest | Level2)
428 {
429     dhBase.deviceId_ = testDeviceId;
430     dhBase.dhId_.clear();
431     int32_t ret = cameraProvider.OpenSession(dhBase);
432     EXPECT_NE(0, ret) << "OpenSession success";
433 }
434 
435 /**
436  * @tc.number: SUB_DH_Dcamera_HDI_OpenSession_0400
437  * @tc.name: testDistributedCameraOpenSession002
438  * @tc.desc: OpenSession, dhBase.deviceId_ = ""
439  */
440 HWTEST_F(DCameraProviderTest, testDistributedCameraOpenSession002, Function | MediumTest | Level2)
441 {
442     dhBase.deviceId_.clear();
443     dhBase.dhId_ = testCameraDh;
444     int32_t ret = cameraProvider.OpenSession(dhBase);
445     EXPECT_NE(0, ret) << "OpenSession fail";
446 }
447 
448 /**
449  * @tc.number: SUB_DH_Dcamera_HDI_OpenSession_0500
450  * @tc.name: testDistributedCameraOpenSession003
451  * @tc.desc: OpenSession, dhBase.deviceId_ = "", dhBase.dhId_ = ""
452  */
453 HWTEST_F(DCameraProviderTest, testDistributedCameraOpenSession003, Function | MediumTest | Level2)
454 {
455     dhBase.deviceId_.clear();
456     dhBase.dhId_.clear();
457     int32_t ret = cameraProvider.OpenSession(dhBase);
458     EXPECT_NE(0, ret) << "OpenSession fail";
459 }
460 
461 /**
462  * @tc.number: SUB_DH_Dcamera_HDI_CloseSession_0200
463  * @tc.name: testDistributedCameraCloseSession001
464  * @tc.desc: CloseSession, dhBase.deviceId_ = "", dhBase.dhId_ = ""
465  */
466 HWTEST_F(DCameraProviderTest, testDistributedCameraCloseSession001, Function | MediumTest | Level2)
467 {
468     dhBase.deviceId_.clear();
469     dhBase.dhId_.clear();
470     int32_t ret = cameraProvider.CloseSession(dhBase);
471     EXPECT_NE(0, ret) << "CloseSession fail";
472 }
473 
474 /**
475  * @tc.number: SUB_DH_Dcamera_HDI_CloseSession_0300
476  * @tc.name: testDistributedCameraCloseSession002
477  * @tc.desc: CloseSession, dhBase.deviceId_ = ""
478  */
479 HWTEST_F(DCameraProviderTest, testDistributedCameraCloseSession002, Function | MediumTest | Level2)
480 {
481     dhBase.deviceId_.clear();
482     dhBase.dhId_ = testCameraDh;
483     int32_t ret = cameraProvider.CloseSession(dhBase);
484     EXPECT_NE(0, ret) << "CloseSession fail";
485 }
486 
487 /**
488  * @tc.number: SUB_DH_Dcamera_HDI_CloseSession_0400
489  * @tc.name: testDistributedCameraCloseSession003
490  * @tc.desc: CloseSession, dhBase.dhId_ = ""
491  */
492 HWTEST_F(DCameraProviderTest, testDistributedCameraCloseSession003, Function | MediumTest | Level2)
493 {
494     dhBase.deviceId_ = testCameraDh;
495     dhBase.dhId_.clear();
496     int32_t ret = cameraProvider.CloseSession(dhBase);
497     EXPECT_NE(0, ret) << "CloseSession fail";
498 }
499 
500 /**
501  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_0700
502  * @tc.name: testDistributedCameraConfigureStreams001
503  * @tc.desc: ConfigureStreams, streamInfo2.encodeType_ is ENCODE_TYPE_MPEG4_ES
504  */
505 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams001, Function | MediumTest | Level2)
506 {
507     dhBase.deviceId_ = testDeviceId;
508     dhBase.dhId_ = testCameraDh;
509     streamInfo2.streamId_ = 1;
510     streamInfo2.width_ = TEST_WIDTH;
511     streamInfo2.height_ = TEST_HEIGTH;
512     streamInfo2.stride_ = 1;
513     streamInfo2.format_ = 1;
514     streamInfo2.dataspace_ = 1;
515     streamInfo2.encodeType_ = ENCODE_TYPE_MPEG4_ES;
516     streamInfo2.type_ = SNAPSHOT_FRAME;
517     streamInfos1.clear();
518     streamInfos1.push_back(streamInfo2);
519     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
520     EXPECT_NE(0, ret) << "ConfigureStreams fail";
521 }
522 
523 /**
524  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_0800
525  * @tc.name: testDistributedCameraConfigureStreams002
526  * @tc.desc: ConfigureStreams, dhBase.deviceId_ = "", streamInfo2.encodeType_ = ENCODE_TYPE_MPEG4_ES
527  */
528 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams002, Function | MediumTest | Level2)
529 {
530     dhBase.deviceId_.clear();
531     dhBase.dhId_ = testCameraDh;
532     streamInfo2.streamId_ = 1;
533     streamInfo2.width_ = TEST_WIDTH;
534     streamInfo2.height_ = TEST_HEIGTH;
535     streamInfo2.stride_ = 1;
536     streamInfo2.format_ = 1;
537     streamInfo2.dataspace_ = 1;
538     streamInfo2.encodeType_ = ENCODE_TYPE_MPEG4_ES;
539     streamInfo2.type_ = SNAPSHOT_FRAME;
540     streamInfos1.clear();
541     streamInfos1.push_back(streamInfo2);
542     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
543     EXPECT_NE(0, ret) << "ConfigureStreams fail";
544 }
545 
546 /**
547  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_0900
548  * @tc.name: testDistributedCameraConfigureStreams003
549  * @tc.desc: ConfigureStreams, dhBase.dhId_ = "", streamInfo2.encodeType_ = ENCODE_TYPE_MPEG4_ES
550  */
551 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams003, Function | MediumTest | Level2)
552 {
553     dhBase.deviceId_ = testDeviceId;
554     dhBase.dhId_.clear();
555     streamInfo2.streamId_ = 1;
556     streamInfo2.width_ = TEST_WIDTH;
557     streamInfo2.height_ = TEST_HEIGTH;
558     streamInfo2.stride_ = 1;
559     streamInfo2.format_ = 1;
560     streamInfo2.dataspace_ = 1;
561     streamInfo2.encodeType_ = ENCODE_TYPE_MPEG4_ES;
562     streamInfo2.type_ = SNAPSHOT_FRAME;
563     streamInfos1.clear();
564     streamInfos1.push_back(streamInfo2);
565     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
566     EXPECT_NE(0, ret) << "ConfigureStreams fail";
567 }
568 
569 /**
570  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_1000
571  * @tc.name: testDistributedCameraConfigureStreams004
572  * @tc.desc: ConfigureStreams, dhBase.deviceId_ = "", dhBase.dhId_ = ""
573  *           streamInfo2.encodeType_ = ENCODE_TYPE_MPEG4_ES
574  */
575 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams004, Function | MediumTest | Level2)
576 {
577     dhBase.deviceId_.clear();
578     dhBase.dhId_.clear();
579     streamInfo2.streamId_ = 1;
580     streamInfo2.width_ = TEST_WIDTH;
581     streamInfo2.height_ = TEST_HEIGTH;
582     streamInfo2.stride_ = 1;
583     streamInfo2.format_ = 1;
584     streamInfo2.dataspace_ = 1;
585     streamInfo2.encodeType_ = ENCODE_TYPE_MPEG4_ES;
586     streamInfo2.type_ = SNAPSHOT_FRAME;
587     streamInfos1.clear();
588     streamInfos1.push_back(streamInfo2);
589     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
590     EXPECT_NE(0, ret) << "ConfigureStreams fail";
591 }
592 
593 /**
594  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_1100
595  * @tc.name: testDistributedCameraConfigureStreams005
596  * @tc.desc: ConfigureStreams, dhBase.deviceId_ = "", dhBase.dhId_ = ""
597  *           streamInfo2.encodeType_ = ENCODE_TYPE_MPEG4_ES, streamInfo2.type_ = CONTINUOUS_FRAME
598  */
599 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams005, Function | MediumTest | Level2)
600 {
601     dhBase.deviceId_.clear();
602     dhBase.dhId_.clear();
603     streamInfo2.streamId_ = 1;
604     streamInfo2.width_ = TEST_WIDTH;
605     streamInfo2.height_ = TEST_HEIGTH;
606     streamInfo2.stride_ = 1;
607     streamInfo2.format_ = 1;
608     streamInfo2.dataspace_ = 1;
609     streamInfo2.encodeType_ = ENCODE_TYPE_MPEG4_ES;
610     streamInfo2.type_ = CONTINUOUS_FRAME;
611     streamInfos1.clear();
612     streamInfos1.push_back(streamInfo2);
613     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
614     EXPECT_NE(0, ret) << "ConfigureStreams fail";
615 }
616 
617 /**
618  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_1200
619  * @tc.name: testDistributedCameraConfigureStreams006
620  * @tc.desc: ConfigureStreams, dhBase.dhId_ = ""
621  *           streamInfo2.encodeType_ = ENCODE_TYPE_MPEG4_ES, streamInfo2.type_ = CONTINUOUS_FRAME
622  */
623 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams006, Function | MediumTest | Level2)
624 {
625     dhBase.deviceId_ = testDeviceId;
626     dhBase.dhId_.clear();
627     streamInfo2.streamId_ = 1;
628     streamInfo2.width_ = TEST_WIDTH;
629     streamInfo2.height_ = TEST_HEIGTH;
630     streamInfo2.stride_ = 1;
631     streamInfo2.format_ = 1;
632     streamInfo2.dataspace_ = 1;
633     streamInfo2.encodeType_ = ENCODE_TYPE_MPEG4_ES;
634     streamInfo2.type_ = CONTINUOUS_FRAME;
635     streamInfos1.clear();
636     streamInfos1.push_back(streamInfo2);
637     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
638     EXPECT_NE(0, ret) << "ConfigureStreams fail";
639 }
640 
641 /**
642  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_1300
643  * @tc.name: testDistributedCameraConfigureStreams007
644  * @tc.desc: ConfigureStreams, dhBase.deviceId_ = ""
645  *           streamInfo2.encodeType_ = ENCODE_TYPE_MPEG4_ES, streamInfo2.type_ = CONTINUOUS_FRAME
646  */
647 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams007, Function | MediumTest | Level2)
648 {
649     dhBase.deviceId_.clear();
650     dhBase.dhId_ = testCameraDh;
651     streamInfo2.streamId_ = 1;
652     streamInfo2.width_ = TEST_WIDTH;
653     streamInfo2.height_ = TEST_HEIGTH;
654     streamInfo2.stride_ = 1;
655     streamInfo2.format_ = 1;
656     streamInfo2.dataspace_ = 1;
657     streamInfo2.encodeType_ = ENCODE_TYPE_MPEG4_ES;
658     streamInfo2.type_ = CONTINUOUS_FRAME;
659     streamInfos1.clear();
660     streamInfos1.push_back(streamInfo2);
661     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
662     EXPECT_NE(0, ret) << "ConfigureStreams fail";
663 }
664 
665 /**
666  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_1400
667  * @tc.name: testDistributedCameraConfigureStreams008
668  * @tc.desc: ConfigureStreams, streamInfo2.encodeType_ = ENCODE_TYPE_MPEG4_ES, streamInfo2.type_ = CONTINUOUS_FRAME
669  */
670 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams008, Function | MediumTest | Level2)
671 {
672     dhBase.deviceId_ = testDeviceId;
673     dhBase.dhId_ = testCameraDh;
674     streamInfo2.streamId_ = 1;
675     streamInfo2.width_ = TEST_WIDTH;
676     streamInfo2.height_ = TEST_HEIGTH;
677     streamInfo2.stride_ = 1;
678     streamInfo2.format_ = 1;
679     streamInfo2.dataspace_ = 1;
680     streamInfo2.encodeType_ = ENCODE_TYPE_MPEG4_ES;
681     streamInfo2.type_ = CONTINUOUS_FRAME;
682     streamInfos1.clear();
683     streamInfos1.push_back(streamInfo2);
684     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
685     EXPECT_NE(0, ret) << "ConfigureStreams fail";
686 }
687 
688 /**
689  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_1500
690  * @tc.name: testDistributedCameraConfigureStreams009
691  * @tc.desc: ConfigureStreams, streamInfo2.encodeType_ = ENCODE_TYPE_JPEG, streamInfo2.type_ = CONTINUOUS_FRAME
692  */
693 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams009, Function | MediumTest | Level2)
694 {
695     dhBase.deviceId_ = testDeviceId;
696     dhBase.dhId_ = testCameraDh;
697     streamInfo2.streamId_ = 1;
698     streamInfo2.width_ = TEST_WIDTH;
699     streamInfo2.height_ = TEST_HEIGTH;
700     streamInfo2.stride_ = 1;
701     streamInfo2.format_ = 1;
702     streamInfo2.dataspace_ = 1;
703     streamInfo2.encodeType_ = ENCODE_TYPE_JPEG;
704     streamInfo2.type_ = CONTINUOUS_FRAME;
705     streamInfos1.clear();
706     streamInfos1.push_back(streamInfo2);
707     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
708     EXPECT_NE(0, ret) << "ConfigureStreams fail";
709 }
710 
711 /**
712  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_1600
713  * @tc.name: testDistributedCameraConfigureStreams010
714  * @tc.desc: ConfigureStreams, dhBase.dhId_ = ""
715  *           streamInfo2.encodeType_ = ENCODE_TYPE_JPEG, streamInfo2.type_ = CONTINUOUS_FRAME
716  */
717 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams010, Function | MediumTest | Level2)
718 {
719     dhBase.deviceId_ = testDeviceId;
720     dhBase.dhId_.clear();
721     streamInfo2.streamId_ = 1;
722     streamInfo2.width_ = TEST_WIDTH;
723     streamInfo2.height_ = TEST_HEIGTH;
724     streamInfo2.stride_ = 1;
725     streamInfo2.format_ = 1;
726     streamInfo2.dataspace_ = 1;
727     streamInfo2.encodeType_ = ENCODE_TYPE_JPEG;
728     streamInfo2.type_ = CONTINUOUS_FRAME;
729     streamInfos1.clear();
730     streamInfos1.push_back(streamInfo2);
731     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
732     EXPECT_NE(0, ret) << "ConfigureStreams fail";
733 }
734 
735 /**
736  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_1700
737  * @tc.name: testDistributedCameraConfigureStreams011
738  * @tc.desc: ConfigureStreams, dhBase.deviceId_ = ""
739  *           streamInfo2.encodeType_ = ENCODE_TYPE_JPEG, streamInfo2.type_ = CONTINUOUS_FRAME
740  */
741 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams011, Function | MediumTest | Level2)
742 {
743     dhBase.deviceId_.clear();
744     dhBase.dhId_ = testCameraDh;
745     streamInfo2.streamId_ = 1;
746     streamInfo2.width_ = TEST_WIDTH;
747     streamInfo2.height_ = TEST_HEIGTH;
748     streamInfo2.stride_ = 1;
749     streamInfo2.format_ = 1;
750     streamInfo2.dataspace_ = 1;
751     streamInfo2.encodeType_ = ENCODE_TYPE_JPEG;
752     streamInfo2.type_ = CONTINUOUS_FRAME;
753     streamInfos1.clear();
754     streamInfos1.push_back(streamInfo2);
755     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
756     EXPECT_NE(0, ret) << "ConfigureStreams fail";
757 }
758 
759 /**
760  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_1800
761  * @tc.name: testDistributedCameraConfigureStreams012
762  * @tc.desc: ConfigureStreams, dhBase.deviceId_ = "", dhBase.dhId_ = ""
763  *           streamInfo2.encodeType_ = ENCODE_TYPE_JPEG, streamInfo2.type_ = CONTINUOUS_FRAME
764  */
765 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams012, Function | MediumTest | Level2)
766 {
767     dhBase.deviceId_.clear();
768     dhBase.dhId_.clear();
769     streamInfo2.streamId_ = 1;
770     streamInfo2.width_ = TEST_WIDTH;
771     streamInfo2.height_ = TEST_HEIGTH;
772     streamInfo2.stride_ = 1;
773     streamInfo2.format_ = 1;
774     streamInfo2.dataspace_ = 1;
775     streamInfo2.encodeType_ = ENCODE_TYPE_JPEG;
776     streamInfo2.type_ = CONTINUOUS_FRAME;
777     streamInfos1.clear();
778     streamInfos1.push_back(streamInfo2);
779     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
780     EXPECT_NE(0, ret) << "ConfigureStreams fail";
781 }
782 
783 /**
784  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_1900
785  * @tc.name: testDistributedCameraConfigureStreams013
786  * @tc.desc: ConfigureStreams, dhBase.deviceId_ = "", dhBase.dhId_ = ""
787  *           streamInfo2.encodeType_ = ENCODE_TYPE_H265, streamInfo2.type_ = CONTINUOUS_FRAME
788  */
789 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams013, Function | MediumTest | Level2)
790 {
791     dhBase.deviceId_.clear();
792     dhBase.dhId_.clear();
793     streamInfo2.streamId_ = 1;
794     streamInfo2.width_ = TEST_WIDTH;
795     streamInfo2.height_ = TEST_HEIGTH;
796     streamInfo2.stride_ = 1;
797     streamInfo2.format_ = 1;
798     streamInfo2.dataspace_ = 1;
799     streamInfo2.encodeType_ = ENCODE_TYPE_H265;
800     streamInfo2.type_ = CONTINUOUS_FRAME;
801     streamInfos1.clear();
802     streamInfos1.push_back(streamInfo2);
803     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
804     EXPECT_NE(0, ret) << "ConfigureStreams fail";
805 }
806 
807 /**
808  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_2000
809  * @tc.name: testDistributedCameraConfigureStreams014
810  * @tc.desc: ConfigureStreams, dhBase.deviceId_ = ""
811  *           streamInfo2.encodeType_ = ENCODE_TYPE_H265, streamInfo2.type_ = CONTINUOUS_FRAME
812  */
813 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams014, Function | MediumTest | Level2)
814 {
815     dhBase.deviceId_.clear();
816     dhBase.dhId_ = testCameraDh;
817     streamInfo2.streamId_ = 1;
818     streamInfo2.width_ = TEST_WIDTH;
819     streamInfo2.height_ = TEST_HEIGTH;
820     streamInfo2.stride_ = 1;
821     streamInfo2.format_ = 1;
822     streamInfo2.dataspace_ = 1;
823     streamInfo2.encodeType_ = ENCODE_TYPE_H265;
824     streamInfo2.type_ = CONTINUOUS_FRAME;
825     streamInfos1.clear();
826     streamInfos1.push_back(streamInfo2);
827     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
828     EXPECT_NE(0, ret) << "ConfigureStreams fail";
829 }
830 
831 /**
832  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_2100
833  * @tc.name: testDistributedCameraConfigureStreams015
834  * @tc.desc: ConfigureStreams, dhBase.dhId = ""
835  *           streamInfo2.encodeType_ = ENCODE_TYPE_H265, streamInfo2.type_ = CONTINUOUS_FRAME
836  */
837 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams015, Function | MediumTest | Level2)
838 {
839     dhBase.deviceId_ = testDeviceId;
840     dhBase.dhId_.clear();
841     streamInfo2.streamId_ = 1;
842     streamInfo2.width_ = TEST_WIDTH;
843     streamInfo2.height_ = TEST_HEIGTH;
844     streamInfo2.stride_ = 1;
845     streamInfo2.format_ = 1;
846     streamInfo2.dataspace_ = 1;
847     streamInfo2.encodeType_ = ENCODE_TYPE_H265;
848     streamInfo2.type_ = CONTINUOUS_FRAME;
849     streamInfos1.clear();
850     streamInfos1.push_back(streamInfo2);
851     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
852     EXPECT_NE(0, ret) << "ConfigureStreams fail";
853 }
854 
855 /**
856  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_2200
857  * @tc.name: testDistributedCameraConfigureStreams016
858  * @tc.desc: ConfigureStreams, dhBase.dhId = ""
859  *           streamInfo2.encodeType_ = ENCODE_TYPE_H264, streamInfo2.type_ = CONTINUOUS_FRAME
860  */
861 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams016, Function | MediumTest | Level2)
862 {
863     dhBase.deviceId_ = testDeviceId;
864     dhBase.dhId_.clear();
865     streamInfo2.streamId_ = 1;
866     streamInfo2.width_ = TEST_WIDTH;
867     streamInfo2.height_ = TEST_HEIGTH;
868     streamInfo2.stride_ = 1;
869     streamInfo2.format_ = 1;
870     streamInfo2.dataspace_ = 1;
871     streamInfo2.encodeType_ = ENCODE_TYPE_H264;
872     streamInfo2.type_ = CONTINUOUS_FRAME;
873     streamInfos1.clear();
874     streamInfos1.push_back(streamInfo2);
875     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
876     EXPECT_NE(0, ret) << "ConfigureStreams fail";
877 }
878 
879 /**
880  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_2300
881  * @tc.name: testDistributedCameraConfigureStreams017
882  * @tc.desc: ConfigureStreams, dhBase.deviceId_ = "", dhBase.dhId = ""
883  *           streamInfo2.encodeType_ = ENCODE_TYPE_H264, streamInfo2.type_ = CONTINUOUS_FRAME
884  */
885 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams017, Function | MediumTest | Level2)
886 {
887     dhBase.deviceId_.clear();
888     dhBase.dhId_ = testCameraDh;
889     streamInfo2.streamId_ = 1;
890     streamInfo2.width_ = TEST_WIDTH;
891     streamInfo2.height_ = TEST_HEIGTH;
892     streamInfo2.stride_ = 1;
893     streamInfo2.format_ = 1;
894     streamInfo2.dataspace_ = 1;
895     streamInfo2.encodeType_ = ENCODE_TYPE_H264;
896     streamInfo2.type_ = CONTINUOUS_FRAME;
897     streamInfos1.clear();
898     streamInfos1.push_back(streamInfo2);
899     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
900     EXPECT_NE(0, ret) << "ConfigureStreams fail";
901 }
902 
903 /**
904  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_2400
905  * @tc.name: testDistributedCameraConfigureStreams018
906  * @tc.desc: ConfigureStreams, dhBase.deviceId_ = "", dhBase.dhId = ""
907  *           streamInfo2.encodeType_ = ENCODE_TYPE_H264, streamInfo2.type_ = CONTINUOUS_FRAME
908  */
909 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams018, Function | MediumTest | Level2)
910 {
911     dhBase.deviceId_.clear();
912     dhBase.dhId_.clear();
913     streamInfo2.streamId_ = 1;
914     streamInfo2.width_ = TEST_WIDTH;
915     streamInfo2.height_ = TEST_HEIGTH;
916     streamInfo2.stride_ = 1;
917     streamInfo2.format_ = 1;
918     streamInfo2.dataspace_ = 1;
919     streamInfo2.encodeType_ = ENCODE_TYPE_H264;
920     streamInfo2.type_ = CONTINUOUS_FRAME;
921     streamInfos1.clear();
922     streamInfos1.push_back(streamInfo2);
923     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
924     EXPECT_NE(0, ret) << "ConfigureStreams fail";
925 }
926 
927 /**
928  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_2500
929  * @tc.name: testDistributedCameraConfigureStreams019
930  * @tc.desc: ConfigureStreams, dhBase.deviceId_ = "", dhBase.dhId = ""
931  *           streamInfo2.encodeType_ = ENCODE_TYPE_NULL, streamInfo2.type_ = CONTINUOUS_FRAME
932  */
933 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams019, Function | MediumTest | Level2)
934 {
935     dhBase.deviceId_.clear();
936     dhBase.dhId_.clear();
937     streamInfo2.streamId_ = 1;
938     streamInfo2.width_ = TEST_WIDTH;
939     streamInfo2.height_ = TEST_HEIGTH;
940     streamInfo2.stride_ = 1;
941     streamInfo2.format_ = 1;
942     streamInfo2.dataspace_ = 1;
943     streamInfo2.encodeType_ = ENCODE_TYPE_NULL;
944     streamInfo2.type_ = CONTINUOUS_FRAME;
945     streamInfos1.clear();
946     streamInfos1.push_back(streamInfo2);
947     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
948     EXPECT_NE(0, ret) << "ConfigureStreams fail";
949 }
950 
951 /**
952  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_2600
953  * @tc.name: testDistributedCameraConfigureStreams020
954  * @tc.desc: ConfigureStreams, dhBase.deviceId_ = ""
955  *           streamInfo2.encodeType_ = ENCODE_TYPE_NULL, streamInfo2.type_ = CONTINUOUS_FRAME
956  */
957 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams020, Function | MediumTest | Level2)
958 {
959     dhBase.deviceId_.clear();
960     dhBase.dhId_ = testCameraDh;
961     streamInfo2.streamId_ = 1;
962     streamInfo2.width_ = TEST_WIDTH;
963     streamInfo2.height_ = TEST_HEIGTH;
964     streamInfo2.stride_ = 1;
965     streamInfo2.format_ = 1;
966     streamInfo2.dataspace_ = 1;
967     streamInfo2.encodeType_ = ENCODE_TYPE_NULL;
968     streamInfo2.type_ = CONTINUOUS_FRAME;
969     streamInfos1.clear();
970     streamInfos1.push_back(streamInfo2);
971     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
972     EXPECT_NE(0, ret) << "ConfigureStreams fail";
973 }
974 
975 /**
976  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_2700
977  * @tc.name: testDistributedCameraConfigureStreams021
978  * @tc.desc: ConfigureStreams, dhBase.dhId = ""
979  *           streamInfo2.encodeType_ = ENCODE_TYPE_NULL, streamInfo2.type_ = CONTINUOUS_FRAME
980  */
981 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams021, Function | MediumTest | Level2)
982 {
983     dhBase.deviceId_ = testDeviceId;
984     dhBase.dhId_.clear();
985     streamInfo2.streamId_ = 1;
986     streamInfo2.width_ = TEST_WIDTH;
987     streamInfo2.height_ = TEST_HEIGTH;
988     streamInfo2.stride_ = 1;
989     streamInfo2.format_ = 1;
990     streamInfo2.dataspace_ = 1;
991     streamInfo2.encodeType_ = ENCODE_TYPE_NULL;
992     streamInfo2.type_ = CONTINUOUS_FRAME;
993     streamInfos1.clear();
994     streamInfos1.push_back(streamInfo2);
995     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
996     EXPECT_NE(0, ret) << "ConfigureStreams fail";
997 }
998 
999 /**
1000  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_2800
1001  * @tc.name: testDistributedCameraConfigureStreams022
1002  * @tc.desc: ConfigureStreams, streamInfo2.dataspace_ = 8
1003  *           streamInfo2.encodeType_ = ENCODE_TYPE_NULL, streamInfo2.type_ = CONTINUOUS_FRAME
1004  */
1005 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams022, Function | MediumTest | Level2)
1006 {
1007     dhBase.deviceId_ = testDeviceId;
1008     dhBase.dhId_ = testCameraDh;
1009     streamInfo2.streamId_ = 1;
1010     streamInfo2.width_ = TEST_WIDTH;
1011     streamInfo2.height_ = TEST_HEIGTH;
1012     streamInfo2.stride_ = 1;
1013     streamInfo2.format_ = 1;
1014     streamInfo2.dataspace_ = 8;
1015     streamInfo2.encodeType_ = ENCODE_TYPE_NULL;
1016     streamInfo2.type_ = CONTINUOUS_FRAME;
1017     streamInfos1.clear();
1018     streamInfos1.push_back(streamInfo2);
1019     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
1020     EXPECT_NE(0, ret) << "ConfigureStreams fail";
1021 }
1022 
1023 /**
1024  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_2900
1025  * @tc.name: testDistributedCameraConfigureStreams023
1026  * @tc.desc: ConfigureStreams, streamInfo2.format_ = -1, streamInfo2.dataspace_ = 8
1027  *           streamInfo2.encodeType_ = ENCODE_TYPE_NULL, streamInfo2.type_ = CONTINUOUS_FRAME
1028  */
1029 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams023, Function | MediumTest | Level2)
1030 {
1031     dhBase.deviceId_ = testDeviceId;
1032     dhBase.dhId_ = testCameraDh;
1033     streamInfo2.streamId_ = 1;
1034     streamInfo2.width_ = TEST_WIDTH;
1035     streamInfo2.height_ = TEST_HEIGTH;
1036     streamInfo2.stride_ = 1;
1037     streamInfo2.format_ = -1;
1038     streamInfo2.dataspace_ = 8;
1039     streamInfo2.encodeType_ = ENCODE_TYPE_NULL;
1040     streamInfo2.type_ = CONTINUOUS_FRAME;
1041     streamInfos1.clear();
1042     streamInfos1.push_back(streamInfo2);
1043     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
1044     EXPECT_NE(0, ret) << "ConfigureStreams fail";
1045 }
1046 
1047 /**
1048  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_3000
1049  * @tc.name: testDistributedCameraConfigureStreams024
1050  * @tc.desc: ConfigureStreams, streamInfo2.streamId_ = 2147483647, streamInfo2.dataspace_ = 8
1051  *           streamInfo2.encodeType_ = ENCODE_TYPE_NULL, streamInfo2.type_ = CONTINUOUS_FRAME
1052  */
1053 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams024, Function | MediumTest | Level2)
1054 {
1055     dhBase.deviceId_ = testDeviceId;
1056     dhBase.dhId_ = testCameraDh;
1057     streamInfo2.streamId_ = 2147483647;
1058     streamInfo2.width_ = TEST_WIDTH;
1059     streamInfo2.height_ = TEST_HEIGTH;
1060     streamInfo2.stride_ = 1;
1061     streamInfo2.format_ = 1;
1062     streamInfo2.dataspace_ = 8;
1063     streamInfo2.encodeType_ = ENCODE_TYPE_NULL;
1064     streamInfo2.type_ = CONTINUOUS_FRAME;
1065     streamInfos1.clear();
1066     streamInfos1.push_back(streamInfo2);
1067     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
1068     EXPECT_NE(0, ret) << "ConfigureStreams fail";
1069 }
1070 
1071 /**
1072  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_3100
1073  * @tc.name: testDistributedCameraConfigureStreams025
1074  * @tc.desc: ConfigureStreams, streamInfo2.streamId_ = 2147483647, streamInfo2.format_ = -1
1075  *           streamInfo2.encodeType_ = ENCODE_TYPE_NULL, streamInfo2.type_ = CONTINUOUS_FRAME
1076  */
1077 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams025, Function | MediumTest | Level2)
1078 {
1079     dhBase.deviceId_ = testDeviceId;
1080     dhBase.dhId_ = testCameraDh;
1081     streamInfo2.streamId_ = 2147483647;
1082     streamInfo2.width_ = TEST_WIDTH;
1083     streamInfo2.height_ = TEST_HEIGTH;
1084     streamInfo2.stride_ = 1;
1085     streamInfo2.format_ = -1;
1086     streamInfo2.dataspace_ = 1;
1087     streamInfo2.encodeType_ = ENCODE_TYPE_NULL;
1088     streamInfo2.type_ = CONTINUOUS_FRAME;
1089     streamInfos1.clear();
1090     streamInfos1.push_back(streamInfo2);
1091     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
1092     EXPECT_NE(0, ret) << "ConfigureStreams fail";
1093 }
1094 
1095 /**
1096  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_3200
1097  * @tc.name: testDistributedCameraConfigureStreams026
1098  * @tc.desc: ConfigureStreams, streamInfo2.streamId_ = 2147483647, streamInfo2.format_ = -1
1099  *           streamInfo2.encodeType_ = ENCODE_TYPE_NULL, streamInfo2.type_ = SNAPSHOT_FRAME
1100  */
1101 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams026, Function | MediumTest | Level2)
1102 {
1103     dhBase.deviceId_ = testDeviceId;
1104     dhBase.dhId_ = testCameraDh;
1105     streamInfo2.streamId_ = 2147483647;
1106     streamInfo2.width_ = TEST_WIDTH;
1107     streamInfo2.height_ = TEST_HEIGTH;
1108     streamInfo2.stride_ = 1;
1109     streamInfo2.format_ = -1;
1110     streamInfo2.dataspace_ = 1;
1111     streamInfo2.encodeType_ = ENCODE_TYPE_NULL;
1112     streamInfo2.type_ = SNAPSHOT_FRAME;
1113     streamInfos1.clear();
1114     streamInfos1.push_back(streamInfo2);
1115     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
1116     EXPECT_NE(0, ret) << "ConfigureStreams fail";
1117 }
1118 
1119 /**
1120  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_3300
1121  * @tc.name: testDistributedCameraConfigureStreams027
1122  * @tc.desc: ConfigureStreams, streamInfo2.streamId_ = 2147483647, streamInfo2.dataspace_ = 8
1123  *           streamInfo2.encodeType_ = ENCODE_TYPE_NULL, streamInfo2.type_ = SNAPSHOT_FRAME
1124  */
1125 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams027, Function | MediumTest | Level2)
1126 {
1127     dhBase.deviceId_ = testDeviceId;
1128     dhBase.dhId_ = testCameraDh;
1129     streamInfo2.streamId_ = 2147483647;
1130     streamInfo2.width_ = TEST_WIDTH;
1131     streamInfo2.height_ = TEST_HEIGTH;
1132     streamInfo2.stride_ = 1;
1133     streamInfo2.format_ = 1;
1134     streamInfo2.dataspace_ = 8;
1135     streamInfo2.encodeType_ = ENCODE_TYPE_NULL;
1136     streamInfo2.type_ = SNAPSHOT_FRAME;
1137     streamInfos1.clear();
1138     streamInfos1.push_back(streamInfo2);
1139     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
1140     EXPECT_NE(0, ret) << "ConfigureStreams fail";
1141 }
1142 
1143 /**
1144  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_3400
1145  * @tc.name: testDistributedCameraConfigureStreams028
1146  * @tc.desc: ConfigureStreams, streamInfo2.streamId_ = 2147483647, streamInfo2.dataspace_ = 8
1147  *           streamInfo2.encodeType_ = ENCODE_TYPE_H264, streamInfo2.type_ = SNAPSHOT_FRAME
1148  */
1149 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams028, Function | MediumTest | Level2)
1150 {
1151     dhBase.deviceId_ = testDeviceId;
1152     dhBase.dhId_ = testCameraDh;
1153     streamInfo2.streamId_ = 2147483647;
1154     streamInfo2.width_ = TEST_WIDTH;
1155     streamInfo2.height_ = TEST_HEIGTH;
1156     streamInfo2.stride_ = 1;
1157     streamInfo2.format_ = 1;
1158     streamInfo2.dataspace_ = 8;
1159     streamInfo2.encodeType_ = ENCODE_TYPE_H264;
1160     streamInfo2.type_ = SNAPSHOT_FRAME;
1161     streamInfos1.clear();
1162     streamInfos1.push_back(streamInfo2);
1163     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
1164     EXPECT_NE(0, ret) << "ConfigureStreams fail";
1165 }
1166 
1167 /**
1168  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_3500
1169  * @tc.name: testDistributedCameraConfigureStreams029
1170  * @tc.desc: ConfigureStreams, streamInfo2.streamId_ = 2147483647, streamInfo2.dataspace_ = 8
1171  *           streamInfo2.encodeType_ = ENCODE_TYPE_H265, streamInfo2.type_ = SNAPSHOT_FRAME
1172  */
1173 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams029, Function | MediumTest | Level2)
1174 {
1175     dhBase.deviceId_ = testDeviceId;
1176     dhBase.dhId_ = testCameraDh;
1177     streamInfo2.streamId_ = 2147483647;
1178     streamInfo2.width_ = TEST_WIDTH;
1179     streamInfo2.height_ = TEST_HEIGTH;
1180     streamInfo2.stride_ = 1;
1181     streamInfo2.format_ = 1;
1182     streamInfo2.dataspace_ = 8;
1183     streamInfo2.encodeType_ = ENCODE_TYPE_H265;
1184     streamInfo2.type_ = SNAPSHOT_FRAME;
1185     streamInfos1.clear();
1186     streamInfos1.push_back(streamInfo2);
1187     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
1188     EXPECT_NE(0, ret) << "ConfigureStreams fail";
1189 }
1190 
1191 /**
1192  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_3600
1193  * @tc.name: testDistributedCameraConfigureStreams030
1194  * @tc.desc: ConfigureStreams, streamInfo2.streamId_ = 2147483647, streamInfo2.dataspace_ = 8
1195  *           streamInfo2.encodeType_ = ENCODE_TYPE_JPEG, streamInfo2.type_ = SNAPSHOT_FRAME
1196  */
1197 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams030, Function | MediumTest | Level2)
1198 {
1199     dhBase.deviceId_ = testDeviceId;
1200     dhBase.dhId_ = testCameraDh;
1201     streamInfo2.streamId_ = 2147483647;
1202     streamInfo2.width_ = TEST_WIDTH;
1203     streamInfo2.height_ = TEST_HEIGTH;
1204     streamInfo2.stride_ = 1;
1205     streamInfo2.format_ = 1;
1206     streamInfo2.dataspace_ = 8;
1207     streamInfo2.encodeType_ = ENCODE_TYPE_JPEG;
1208     streamInfo2.type_ = SNAPSHOT_FRAME;
1209     streamInfos1.clear();
1210     streamInfos1.push_back(streamInfo2);
1211     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
1212     EXPECT_NE(0, ret) << "ConfigureStreams fail";
1213 }
1214 
1215 /**
1216  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_3700
1217  * @tc.name: testDistributedCameraConfigureStreams031
1218  * @tc.desc: ConfigureStreams, streamInfo2.streamId_ = 2147483647, streamInfo2.dataspace_ = 8
1219  *           streamInfo2.encodeType_ = ENCODE_TYPE_MPEG4_ES, streamInfo2.type_ = SNAPSHOT_FRAME
1220  */
1221 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams031, Function | MediumTest | Level2)
1222 {
1223     dhBase.deviceId_ = testDeviceId;
1224     dhBase.dhId_ = testCameraDh;
1225     streamInfo2.streamId_ = 2147483647;
1226     streamInfo2.width_ = TEST_WIDTH;
1227     streamInfo2.height_ = TEST_HEIGTH;
1228     streamInfo2.stride_ = 1;
1229     streamInfo2.format_ = 1;
1230     streamInfo2.dataspace_ = 8;
1231     streamInfo2.encodeType_ = ENCODE_TYPE_MPEG4_ES;
1232     streamInfo2.type_ = SNAPSHOT_FRAME;
1233     streamInfos1.clear();
1234     streamInfos1.push_back(streamInfo2);
1235     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
1236     EXPECT_NE(0, ret) << "ConfigureStreams fail";
1237 }
1238 
1239 /**
1240  * @tc.number: SUB_DH_Dcamera_HDI_ConfigureStreams_3800
1241  * @tc.name: testDistributedCameraConfigureStreams032
1242  * @tc.desc: ConfigureStreams, streamInfo2.streamId_ = -1, streamInfo2.dataspace_ = 8
1243  *           streamInfo2.encodeType_ = ENCODE_TYPE_MPEG4_ES, streamInfo2.type_ = SNAPSHOT_FRAME
1244  */
1245 HWTEST_F(DCameraProviderTest, testDistributedCameraConfigureStreams032, Function | MediumTest | Level2)
1246 {
1247     dhBase.deviceId_ = testDeviceId;
1248     dhBase.dhId_ = testCameraDh;
1249     streamInfo2.streamId_ = -1;
1250     streamInfo2.width_ = TEST_WIDTH;
1251     streamInfo2.height_ = TEST_HEIGTH;
1252     streamInfo2.stride_ = 1;
1253     streamInfo2.format_ = 1;
1254     streamInfo2.dataspace_ = 8;
1255     streamInfo2.encodeType_ = ENCODE_TYPE_MPEG4_ES;
1256     streamInfo2.type_ = SNAPSHOT_FRAME;
1257     streamInfos1.clear();
1258     streamInfos1.push_back(streamInfo2);
1259     int32_t ret = cameraProvider.ConfigureStreams(dhBase, streamInfos1);
1260     EXPECT_NE(0, ret) << "ConfigureStreams fail";
1261 }
1262 
1263 /**
1264  * @tc.number: SUB_DH_Dcamera_HDI_ReleaseStreams_0200
1265  * @tc.name: testDistributedCameraReleaseStreams001
1266  * @tc.desc: ReleaseStreams, streamIds.push_back(-2147483648)
1267  */
1268 HWTEST_F(DCameraProviderTest, testDistributedCameraReleaseStreams001, Function | MediumTest | Level2)
1269 {
1270     dhBase.deviceId_ = testDeviceId;
1271     dhBase.dhId_ = testCameraDh;
1272     streamIds.pop_back();
1273     streamIds.push_back(-2147483648);
1274     int32_t ret = cameraProvider.ReleaseStreams(dhBase, streamIds);
1275     EXPECT_NE(0, ret) << "ReleaseStreams fail";
1276 }
1277 
1278 /**
1279  * @tc.number: SUB_DH_Dcamera_HDI_ReleaseStreams_0300
1280  * @tc.name: testDistributedCameraReleaseStreams002
1281  * @tc.desc: ReleaseStreams, dhBase.deviceId_ = ""
1282  */
1283 HWTEST_F(DCameraProviderTest, testDistributedCameraReleaseStreams002, Function | MediumTest | Level2)
1284 {
1285     dhBase.deviceId_.clear();
1286     dhBase.dhId_ = testCameraDh;
1287     int32_t ret = cameraProvider.ReleaseStreams(dhBase, streamIds);
1288     EXPECT_NE(0, ret) << "ReleaseStreams fail";
1289 }
1290 
1291 /**
1292  * @tc.number: SUB_DH_Dcamera_HDI_ReleaseStreams_0400
1293  * @tc.name: testDistributedCameraReleaseStreams003
1294  * @tc.desc: ReleaseStreams, dhBase.dhId_ = ""
1295  */
1296 HWTEST_F(DCameraProviderTest, testDistributedCameraReleaseStreams003, Function | MediumTest | Level2)
1297 {
1298     dhBase.deviceId_ = testDeviceId;
1299     dhBase.dhId_.clear();
1300     int32_t ret = cameraProvider.ReleaseStreams(dhBase, streamIds);
1301     EXPECT_NE(0, ret) << "ReleaseStreams fail";
1302 }
1303 
1304 /**
1305  * @tc.number: SUB_DH_Dcamera_HDI_ReleaseStreams_0500
1306  * @tc.name: testDistributedCameraReleaseStreams004
1307  * @tc.desc: ReleaseStreams, dhBase.deviceId_ = "", dhBase.dhId_ = ""
1308  */
1309 HWTEST_F(DCameraProviderTest, testDistributedCameraReleaseStreams004, Function | MediumTest | Level2)
1310 {
1311     dhBase.deviceId_.clear();
1312     dhBase.dhId_.clear();
1313     int32_t ret = cameraProvider.ReleaseStreams(dhBase, streamIds);
1314     EXPECT_NE(0, ret) << "ReleaseStreams fail";
1315 }
1316 
1317 /**
1318  * @tc.number: SUB_DH_Dcamera_HDI_ReleaseStreams_0600
1319  * @tc.name: testDistributedCameraReleaseStreams005
1320  * @tc.desc: ReleaseStreams, dhBase.deviceId_ = "", dhBase.dhId_ = "" , streamIds.push_back(0);
1321  */
1322 HWTEST_F(DCameraProviderTest, testDistributedCameraReleaseStreams005, Function | MediumTest | Level2)
1323 {
1324     dhBase.deviceId_.clear();
1325     dhBase.dhId_.clear();
1326     streamIds.pop_back();
1327     streamIds.push_back(0);
1328     int32_t ret = cameraProvider.ReleaseStreams(dhBase, streamIds);
1329     EXPECT_NE(0, ret) << "ReleaseStreams fail";
1330 }
1331 
1332 /**
1333  * @tc.number: SUB_DH_Dcamera_HDI_ReleaseStreams_0700
1334  * @tc.name: testDistributedCameraReleaseStreams006
1335  * @tc.desc: ReleaseStreams, dhBase.dhId_ = "" , streamIds.push_back(0);
1336  */
1337 HWTEST_F(DCameraProviderTest, testDistributedCameraReleaseStreams006, Function | MediumTest | Level2)
1338 {
1339     dhBase.deviceId_ = testDeviceId;
1340     dhBase.dhId_.clear();
1341     int32_t ret = cameraProvider.ReleaseStreams(dhBase, streamIds);
1342     EXPECT_NE(0, ret) << "ReleaseStreams fail";
1343 }
1344 
1345 /**
1346  * @tc.number: SUB_DH_Dcamera_HDI_ReleaseStreams_0800
1347  * @tc.name: testDistributedCameraReleaseStreams007
1348  * @tc.desc: ReleaseStreams, dhBase.deviceId_ = "", streamIds.push_back(0);
1349  */
1350 HWTEST_F(DCameraProviderTest, testDistributedCameraReleaseStreams007, Function | MediumTest | Level2)
1351 {
1352     dhBase.deviceId_.clear();
1353     dhBase.dhId_ = testCameraDh;
1354     int32_t ret = cameraProvider.ReleaseStreams(dhBase, streamIds);
1355     EXPECT_NE(0, ret) << "ReleaseStreams fail";
1356 }
1357 
1358 /**
1359  * @tc.number: SUB_DH_Dcamera_HDI_ReleaseStreams_0900
1360  * @tc.name: testDistributedCameraReleaseStreams008
1361  * @tc.desc: ReleaseStreams, dhBase.deviceId_ = "", streamIds.push_back(-1)
1362  */
1363 HWTEST_F(DCameraProviderTest, testDistributedCameraReleaseStreams008, Function | MediumTest | Level2)
1364 {
1365     dhBase.deviceId_.clear();
1366     dhBase.dhId_ = testCameraDh;
1367     streamIds.pop_back();
1368     streamIds.push_back(-1);
1369     int32_t ret = cameraProvider.ReleaseStreams(dhBase, streamIds);
1370     EXPECT_NE(0, ret) << "ReleaseStreams fail";
1371 }
1372 
1373 /**
1374  * @tc.number: SUB_DH_Dcamera_HDI_ReleaseStreams_1000
1375  * @tc.name: testDistributedCameraReleaseStreams009
1376  * @tc.desc: ReleaseStreams, streamIds.push_back(-1)
1377  */
1378 HWTEST_F(DCameraProviderTest, testDistributedCameraReleaseStreams009, Function | MediumTest | Level2)
1379 {
1380     dhBase.deviceId_ = testDeviceId;
1381     dhBase.dhId_ = testCameraDh;
1382     int32_t ret = cameraProvider.ReleaseStreams(dhBase, streamIds);
1383     EXPECT_NE(0, ret) << "ReleaseStreams fail";
1384 }
1385 
1386 /**
1387  * @tc.number: SUB_DH_Dcamera_HDI_ReleaseStreams_1100
1388  * @tc.name: testDistributedCameraReleaseStreams010
1389  * @tc.desc: ReleaseStreams, dhBase.dhId_ = "", streamIds.push_back(-1)
1390  */
1391 HWTEST_F(DCameraProviderTest, testDistributedCameraReleaseStreams010, Function | MediumTest | Level2)
1392 {
1393     dhBase.deviceId_ = testDeviceId;
1394     dhBase.dhId_.clear();
1395     int32_t ret = cameraProvider.ReleaseStreams(dhBase, streamIds);
1396     EXPECT_NE(0, ret) << "ReleaseStreams fail";
1397 }
1398 
1399 /**
1400  * @tc.number: SUB_DH_Dcamera_HDI_ReleaseStreams_1200
1401  * @tc.name: testDistributedCameraReleaseStreams011
1402  * @tc.desc: ReleaseStreams, dhBase.deviceId_ = "", dhBase.dhId_ = "", streamIds.push_back(-1)
1403  */
1404 HWTEST_F(DCameraProviderTest, testDistributedCameraReleaseStreams011, Function | MediumTest | Level2)
1405 {
1406     dhBase.deviceId_.clear();
1407     dhBase.dhId_.clear();
1408     int32_t ret = cameraProvider.ReleaseStreams(dhBase, streamIds);
1409     EXPECT_NE(0, ret) << "ReleaseStreams fail";
1410 }
1411 
1412 /**
1413  * @tc.number: SUB_DH_Dcamera_HDI_ReleaseStreams_1300
1414  * @tc.name: testDistributedCameraReleaseStreams012
1415  * @tc.desc: ReleaseStreams, streamIds.push_back(2147483647)
1416  */
1417 HWTEST_F(DCameraProviderTest, testDistributedCameraReleaseStreams012, Function | MediumTest | Level2)
1418 {
1419     dhBase.deviceId_ = testDeviceId;
1420     dhBase.dhId_ = testCameraDh;
1421     streamIds.pop_back();
1422     streamIds.push_back(2147483647);
1423     int32_t ret = cameraProvider.ReleaseStreams(dhBase, streamIds);
1424     EXPECT_NE(0, ret) << "ReleaseStreams fail";
1425 }
1426 
1427 /**
1428  * @tc.number: SUB_DH_Dcamera_HDI_ReleaseStreams_1400
1429  * @tc.name: testDistributedCameraReleaseStreams013
1430  * @tc.desc: ReleaseStreams, dhBase.dhId_ = "", streamIds.push_back(2147483647)
1431  */
1432 HWTEST_F(DCameraProviderTest, testDistributedCameraReleaseStreams013, Function | MediumTest | Level2)
1433 {
1434     dhBase.deviceId_ = testDeviceId;
1435     dhBase.dhId_.clear();
1436     int32_t ret = cameraProvider.ReleaseStreams(dhBase, streamIds);
1437     EXPECT_NE(0, ret) << "ReleaseStreams fail";
1438 }
1439 
1440 /**
1441  * @tc.number: SUB_DH_Dcamera_HDI_ReleaseStreams_1500
1442  * @tc.name: testDistributedCameraReleaseStreams014
1443  * @tc.desc: ReleaseStreams, dhBase.deviceId_ = "", streamIds.push_back(2147483647)
1444  */
1445 HWTEST_F(DCameraProviderTest, testDistributedCameraReleaseStreams014, Function | MediumTest | Level2)
1446 {
1447     dhBase.deviceId_.clear();
1448     dhBase.dhId_ = testCameraDh;
1449     int32_t ret = cameraProvider.ReleaseStreams(dhBase, streamIds);
1450     EXPECT_NE(0, ret) << "ReleaseStreams fail";
1451 }
1452 
1453 /**
1454  * @tc.number: SUB_DH_Dcamera_HDI_ReleaseStreams_1600
1455  * @tc.name: testDistributedCameraReleaseStreams015
1456  * @tc.desc: ReleaseStreams, dhBase.dhId_ = "", dhBase.deviceId_ = "", streamIds.push_back(2147483647)
1457  */
1458 HWTEST_F(DCameraProviderTest, testDistributedCameraReleaseStreams015, Function | MediumTest | Level2)
1459 {
1460     dhBase.deviceId_.clear();
1461     dhBase.dhId_.clear();
1462     int32_t ret = cameraProvider.ReleaseStreams(dhBase, streamIds);
1463     EXPECT_NE(0, ret) << "ReleaseStreams fail";
1464 }
1465 
1466 /**
1467  * @tc.number: SUB_DH_Dcamera_HDI_ReleaseStreams_1700
1468  * @tc.name: testDistributedCameraReleaseStreams016
1469  * @tc.desc: ReleaseStreams, dhBase.dhId_ = "", dhBase.deviceId_ = "", streamIds.push_back(-2147483648)
1470  */
1471 HWTEST_F(DCameraProviderTest, testDistributedCameraReleaseStreams016, Function | MediumTest | Level2)
1472 {
1473     dhBase.deviceId_.clear();
1474     dhBase.dhId_.clear();
1475     streamIds.pop_back();
1476     streamIds.push_back(-2147483648);
1477     int32_t ret = cameraProvider.ReleaseStreams(dhBase, streamIds);
1478     EXPECT_NE(0, ret) << "ReleaseStreams fail";
1479 }
1480 
1481 /**
1482  * @tc.number: SUB_DH_Dcamera_HDI_ReleaseStreams_1800
1483  * @tc.name: testDistributedCameraReleaseStreams017
1484  * @tc.desc: ReleaseStreams, dhBase.deviceId_ = "", streamIds.push_back(-2147483648)
1485  */
1486 HWTEST_F(DCameraProviderTest, testDistributedCameraReleaseStreams017, Function | MediumTest | Level2)
1487 {
1488     dhBase.deviceId_.clear();
1489     dhBase.dhId_ = testCameraDh;
1490     int32_t ret = cameraProvider.ReleaseStreams(dhBase, streamIds);
1491     EXPECT_NE(0, ret) << "ReleaseStreams fail";
1492 }
1493 
1494 /**
1495  * @tc.number: SUB_DH_Dcamera_HDI_ReleaseStreams_1900
1496  * @tc.name: testDistributedCameraReleaseStreams018
1497  * @tc.desc: ReleaseStreams, dhBase.dhId_ = "", streamIds.push_back(-2147483648)
1498  */
1499 HWTEST_F(DCameraProviderTest, testDistributedCameraReleaseStreams018, Function | MediumTest | Level2)
1500 {
1501     dhBase.deviceId_ = testDeviceId;
1502     dhBase.dhId_.clear();
1503     int32_t ret = cameraProvider.ReleaseStreams(dhBase, streamIds);
1504     EXPECT_NE(0, ret) << "ReleaseStreams fail";
1505 }
1506 
1507 /**
1508  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_0500
1509  * @tc.name: testDistributedCameraStartCapture001
1510  * @tc.desc: StartCapture, dhBase.deviceId_ = "",
1511  *           captureInfo2.encodeType_ = ENCODE_TYPE_H265, captureInfo2.type_ = CONTINUOUS_FRAME
1512  */
1513 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture001, Function | MediumTest | Level2)
1514 {
1515     dhBase.deviceId_.clear();
1516     dhBase.dhId_ = testCameraDh;
1517     captureInfo2.streamIds_.push_back(1);
1518     captureInfo2.width_ = TEST_WIDTH;
1519     captureInfo2.height_ = TEST_HEIGTH;
1520     captureInfo2.stride_ = 1;
1521     captureInfo2.format_ = 1;
1522     captureInfo2.dataspace_ = 1;
1523     captureInfo2.encodeType_ = ENCODE_TYPE_H265;
1524     captureInfo2.type_ = CONTINUOUS_FRAME;
1525     captureInfos1.clear();
1526     captureInfos1.push_back(captureInfo2);
1527     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
1528     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
1529 }
1530 
1531 /**
1532  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_0600
1533  * @tc.name: testDistributedCameraStartCapture002
1534  * @tc.desc: StartCapture, dhBase.deviceId_ = "", dhBase.dhId_ = ""
1535  *           captureInfo2.encodeType_ = ENCODE_TYPE_H265, captureInfo2.type_ = CONTINUOUS_FRAME
1536  */
1537 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture002, Function | MediumTest | Level1)
1538 {
1539     dhBase.deviceId_.clear();
1540     dhBase.dhId_.clear();
1541     captureInfo2.streamIds_.push_back(1);
1542     captureInfo2.width_ = TEST_WIDTH;
1543     captureInfo2.height_ = TEST_HEIGTH;
1544     captureInfo2.stride_ = 1;
1545     captureInfo2.format_ = 1;
1546     captureInfo2.dataspace_ = 1;
1547     captureInfo2.encodeType_ = ENCODE_TYPE_H265;
1548     captureInfo2.type_ = CONTINUOUS_FRAME;
1549     captureInfos1.clear();
1550     captureInfos1.push_back(captureInfo2);
1551     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
1552     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
1553 }
1554 
1555 /**
1556  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_0700
1557  * @tc.name: testDistributedCameraStartCapture003
1558  * @tc.desc: StartCapture, dhBase.dhId_ = ""
1559  *           captureInfo2.encodeType_ = ENCODE_TYPE_H265, captureInfo2.type_ = CONTINUOUS_FRAME
1560  */
1561 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture003, Function | MediumTest | Level1)
1562 {
1563     dhBase.deviceId_ = testDeviceId;
1564     dhBase.dhId_.clear();
1565     captureInfo2.streamIds_.push_back(1);
1566     captureInfo2.width_ = TEST_WIDTH;
1567     captureInfo2.height_ = TEST_HEIGTH;
1568     captureInfo2.stride_ = 1;
1569     captureInfo2.format_ = 1;
1570     captureInfo2.dataspace_ = 1;
1571     captureInfo2.encodeType_ = ENCODE_TYPE_H265;
1572     captureInfo2.type_ = CONTINUOUS_FRAME;
1573     captureInfos1.clear();
1574     captureInfos1.push_back(captureInfo2);
1575     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
1576     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
1577 }
1578 
1579 /**
1580  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_0800
1581  * @tc.name: testDistributedCameraStartCapture004
1582  * @tc.desc: StartCapture, dhBase.dhId_ = ""
1583  *           captureInfo2.encodeType_ = ENCODE_TYPE_H265, captureInfo2.type_ = SNAPSHOT_FRAME
1584  */
1585 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture004, Function | MediumTest | Level1)
1586 {
1587     dhBase.deviceId_ = testDeviceId;
1588     dhBase.dhId_.clear();
1589     captureInfo2.streamIds_.push_back(1);
1590     captureInfo2.width_ = TEST_WIDTH;
1591     captureInfo2.height_ = TEST_HEIGTH;
1592     captureInfo2.stride_ = 1;
1593     captureInfo2.format_ = 1;
1594     captureInfo2.dataspace_ = 1;
1595     captureInfo2.encodeType_ = ENCODE_TYPE_H265;
1596     captureInfo2.type_ = SNAPSHOT_FRAME;
1597     captureInfos1.clear();
1598     captureInfos1.push_back(captureInfo2);
1599     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
1600     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
1601 }
1602 
1603 /**
1604  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_0900
1605  * @tc.name: testDistributedCameraStartCapture005
1606  * @tc.desc: StartCapture, dhBase.deviceId_ = ""
1607  *           captureInfo2.encodeType_ = ENCODE_TYPE_H265, captureInfo2.type_ = SNAPSHOT_FRAME
1608  */
1609 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture005, Function | MediumTest | Level1)
1610 {
1611     dhBase.deviceId_.clear();
1612     dhBase.dhId_ = testCameraDh;
1613     captureInfo2.streamIds_.push_back(1);
1614     captureInfo2.width_ = TEST_WIDTH;
1615     captureInfo2.height_ = TEST_HEIGTH;
1616     captureInfo2.stride_ = 1;
1617     captureInfo2.format_ = 1;
1618     captureInfo2.dataspace_ = 1;
1619     captureInfo2.encodeType_ = ENCODE_TYPE_H265;
1620     captureInfo2.type_ = SNAPSHOT_FRAME;
1621     captureInfos1.clear();
1622     captureInfos1.push_back(captureInfo2);
1623     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
1624     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
1625 }
1626 
1627 /**
1628  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_1000
1629  * @tc.name: testDistributedCameraStartCapture006
1630  * @tc.desc: StartCapture, dhBase.deviceId_ = "", dhBase.dhId_ = ""
1631  *           captureInfo2.encodeType_ = ENCODE_TYPE_H265, captureInfo2.type_ = SNAPSHOT_FRAME
1632  */
1633 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture006, Function | MediumTest | Level1)
1634 {
1635     dhBase.deviceId_.clear();
1636     dhBase.dhId_.clear();
1637     captureInfo2.streamIds_.push_back(1);
1638     captureInfo2.width_ = TEST_WIDTH;
1639     captureInfo2.height_ = TEST_HEIGTH;
1640     captureInfo2.stride_ = 1;
1641     captureInfo2.format_ = 1;
1642     captureInfo2.dataspace_ = 1;
1643     captureInfo2.encodeType_ = ENCODE_TYPE_H265;
1644     captureInfo2.type_ = SNAPSHOT_FRAME;
1645     captureInfos1.clear();
1646     captureInfos1.push_back(captureInfo2);
1647     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
1648     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
1649 }
1650 
1651 /**
1652  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_1100
1653  * @tc.name: testDistributedCameraStartCapture007
1654  * @tc.desc: StartCapture, dhBase.deviceId_ = "", dhBase.dhId_ = ""
1655  *           captureInfo2.encodeType_ = ENCODE_TYPE_H264, captureInfo2.type_ = SNAPSHOT_FRAME
1656  */
1657 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture007, Function | MediumTest | Level1)
1658 {
1659     dhBase.deviceId_.clear();
1660     dhBase.dhId_.clear();
1661     captureInfo2.streamIds_.push_back(1);
1662     captureInfo2.width_ = TEST_WIDTH;
1663     captureInfo2.height_ = TEST_HEIGTH;
1664     captureInfo2.stride_ = 1;
1665     captureInfo2.format_ = 1;
1666     captureInfo2.dataspace_ = 1;
1667     captureInfo2.encodeType_ = ENCODE_TYPE_H264;
1668     captureInfo2.type_ = SNAPSHOT_FRAME;
1669     captureInfos1.clear();
1670     captureInfos1.push_back(captureInfo2);
1671     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
1672     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
1673 }
1674 
1675 /**
1676  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_1200
1677  * @tc.name: testDistributedCameraStartCapture008
1678  * @tc.desc: StartCapture, dhBase.deviceId_ = ""
1679  *           captureInfo2.encodeType_ = ENCODE_TYPE_H264, captureInfo2.type_ = SNAPSHOT_FRAME
1680  */
1681 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture008, Function | MediumTest | Level1)
1682 {
1683     dhBase.deviceId_.clear();
1684     dhBase.dhId_ = testCameraDh;
1685     captureInfo2.streamIds_.push_back(1);
1686     captureInfo2.width_ = TEST_WIDTH;
1687     captureInfo2.height_ = TEST_HEIGTH;
1688     captureInfo2.stride_ = 1;
1689     captureInfo2.format_ = 1;
1690     captureInfo2.dataspace_ = 1;
1691     captureInfo2.encodeType_ = ENCODE_TYPE_H264;
1692     captureInfo2.type_ = SNAPSHOT_FRAME;
1693     captureInfos1.clear();
1694     captureInfos1.push_back(captureInfo2);
1695     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
1696     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
1697 }
1698 
1699 /**
1700  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_1300
1701  * @tc.name: testDistributedCameraStartCapture009
1702  * @tc.desc: StartCapture, dhBase.dhId_ = ""
1703  *           captureInfo2.encodeType_ = ENCODE_TYPE_H264, captureInfo2.type_ = SNAPSHOT_FRAME
1704  */
1705 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture009, Function | MediumTest | Level1)
1706 {
1707     dhBase.deviceId_ = testDeviceId;
1708     dhBase.dhId_.clear();
1709     captureInfo2.streamIds_.push_back(1);
1710     captureInfo2.width_ = TEST_WIDTH;
1711     captureInfo2.height_ = TEST_HEIGTH;
1712     captureInfo2.stride_ = 1;
1713     captureInfo2.format_ = 1;
1714     captureInfo2.dataspace_ = 1;
1715     captureInfo2.encodeType_ = ENCODE_TYPE_H264;
1716     captureInfo2.type_ = SNAPSHOT_FRAME;
1717     captureInfos1.clear();
1718     captureInfos1.push_back(captureInfo2);
1719     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
1720     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
1721 }
1722 
1723 /**
1724  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_1400
1725  * @tc.name: testDistributedCameraStartCapture010
1726  * @tc.desc: StartCapture, dhBase.deviceId_ = "", dhBase.dhId_ = ""
1727  *           captureInfo2.encodeType_ = ENCODE_TYPE_H264, captureInfo2.type_ = CONTINUOUS_FRAME
1728  */
1729 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture010, Function | MediumTest | Level1)
1730 {
1731     dhBase.deviceId_.clear();
1732     dhBase.dhId_.clear();
1733     captureInfo2.streamIds_.push_back(1);
1734     captureInfo2.width_ = TEST_WIDTH;
1735     captureInfo2.height_ = TEST_HEIGTH;
1736     captureInfo2.stride_ = 1;
1737     captureInfo2.format_ = 1;
1738     captureInfo2.dataspace_ = 1;
1739     captureInfo2.encodeType_ = ENCODE_TYPE_H264;
1740     captureInfo2.type_ = CONTINUOUS_FRAME;
1741     captureInfos1.clear();
1742     captureInfos1.push_back(captureInfo2);
1743     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
1744     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
1745 }
1746 
1747 /**
1748  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_1500
1749  * @tc.name: testDistributedCameraStartCapture011
1750  * @tc.desc: StartCapture, dhBase.deviceId_ = ""
1751  *           captureInfo2.encodeType_ = ENCODE_TYPE_H264, captureInfo2.type_ = CONTINUOUS_FRAME
1752  */
1753 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture011, Function | MediumTest | Level1)
1754 {
1755     dhBase.deviceId_.clear();
1756     dhBase.dhId_ = testCameraDh;
1757     captureInfo2.streamIds_.push_back(1);
1758     captureInfo2.width_ = TEST_WIDTH;
1759     captureInfo2.height_ = TEST_HEIGTH;
1760     captureInfo2.stride_ = 1;
1761     captureInfo2.format_ = 1;
1762     captureInfo2.dataspace_ = 1;
1763     captureInfo2.encodeType_ = ENCODE_TYPE_H264;
1764     captureInfo2.type_ = CONTINUOUS_FRAME;
1765     captureInfos1.clear();
1766     captureInfos1.push_back(captureInfo2);
1767     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
1768     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
1769 }
1770 
1771 /**
1772  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_1600
1773  * @tc.name: testDistributedCameraStartCapture012
1774  * @tc.desc: StartCapture, dhBase.dhId_ = ""
1775  *           captureInfo2.encodeType_ = ENCODE_TYPE_H264, captureInfo2.type_ = CONTINUOUS_FRAME
1776  */
1777 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture012, Function | MediumTest | Level1)
1778 {
1779     dhBase.deviceId_ = testDeviceId;
1780     dhBase.dhId_.clear();
1781     captureInfo2.streamIds_.push_back(1);
1782     captureInfo2.width_ = TEST_WIDTH;
1783     captureInfo2.height_ = TEST_HEIGTH;
1784     captureInfo2.stride_ = 1;
1785     captureInfo2.format_ = 1;
1786     captureInfo2.dataspace_ = 1;
1787     captureInfo2.encodeType_ = ENCODE_TYPE_H264;
1788     captureInfo2.type_ = CONTINUOUS_FRAME;
1789     captureInfos1.clear();
1790     captureInfos1.push_back(captureInfo2);
1791     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
1792     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
1793 }
1794 
1795 /**
1796  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_1700
1797  * @tc.name: testDistributedCameraStartCapture013
1798  * @tc.desc: StartCapture, dhBase.dhId_ = ""
1799  *           captureInfo2.encodeType_ = ENCODE_TYPE_NULL, captureInfo2.type_ = CONTINUOUS_FRAME
1800  */
1801 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture013, Function | MediumTest | Level1)
1802 {
1803     dhBase.deviceId_ = testDeviceId;
1804     dhBase.dhId_.clear();
1805     captureInfo2.streamIds_.push_back(1);
1806     captureInfo2.width_ = TEST_WIDTH;
1807     captureInfo2.height_ = TEST_HEIGTH;
1808     captureInfo2.stride_ = 1;
1809     captureInfo2.format_ = 1;
1810     captureInfo2.dataspace_ = 1;
1811     captureInfo2.encodeType_ = ENCODE_TYPE_NULL;
1812     captureInfo2.type_ = CONTINUOUS_FRAME;
1813     captureInfos1.clear();
1814     captureInfos1.push_back(captureInfo2);
1815     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
1816     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
1817 }
1818 
1819 /**
1820  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_1800
1821  * @tc.name: testDistributedCameraStartCapture014
1822  * @tc.desc: StartCapture, dhBase.dhId_ = "", dhBase.deviceId_ = ""
1823  *           captureInfo2.encodeType_ = ENCODE_TYPE_NULL, captureInfo2.type_ = CONTINUOUS_FRAME
1824  */
1825 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture014, Function | MediumTest | Level1)
1826 {
1827     dhBase.deviceId_.clear();
1828     dhBase.dhId_.clear();
1829     captureInfo2.streamIds_.push_back(1);
1830     captureInfo2.width_ = TEST_WIDTH;
1831     captureInfo2.height_ = TEST_HEIGTH;
1832     captureInfo2.stride_ = 1;
1833     captureInfo2.format_ = 1;
1834     captureInfo2.dataspace_ = 1;
1835     captureInfo2.encodeType_ = ENCODE_TYPE_NULL;
1836     captureInfo2.type_ = CONTINUOUS_FRAME;
1837     captureInfos1.clear();
1838     captureInfos1.push_back(captureInfo2);
1839     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
1840     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
1841 }
1842 
1843 /**
1844  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_1900
1845  * @tc.name: testDistributedCameraStartCapture015
1846  * @tc.desc: StartCapture, dhBase.deviceId_ = ""
1847  *           captureInfo2.encodeType_ = ENCODE_TYPE_NULL, captureInfo2.type_ = CONTINUOUS_FRAME
1848  */
1849 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture015, Function | MediumTest | Level1)
1850 {
1851     dhBase.deviceId_.clear();
1852     dhBase.dhId_ = testCameraDh;
1853     captureInfo2.streamIds_.push_back(1);
1854     captureInfo2.width_ = TEST_WIDTH;
1855     captureInfo2.height_ = TEST_HEIGTH;
1856     captureInfo2.stride_ = 1;
1857     captureInfo2.format_ = 1;
1858     captureInfo2.dataspace_ = 1;
1859     captureInfo2.encodeType_ = ENCODE_TYPE_NULL;
1860     captureInfo2.type_ = CONTINUOUS_FRAME;
1861     captureInfos1.clear();
1862     captureInfos1.push_back(captureInfo2);
1863     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
1864     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
1865 }
1866 
1867 /**
1868  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_2000
1869  * @tc.name: testDistributedCameraStartCapture016
1870  * @tc.desc: StartCapture, captureInfo2.encodeType_ = ENCODE_TYPE_NULL, captureInfo2.type_ = CONTINUOUS_FRAME
1871  */
1872 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture016, Function | MediumTest | Level1)
1873 {
1874     dhBase.deviceId_ = testDeviceId;
1875     dhBase.dhId_ = testCameraDh;
1876     captureInfo2.streamIds_.push_back(1);
1877     captureInfo2.width_ = TEST_WIDTH;
1878     captureInfo2.height_ = TEST_HEIGTH;
1879     captureInfo2.stride_ = 1;
1880     captureInfo2.format_ = 1;
1881     captureInfo2.dataspace_ = 1;
1882     captureInfo2.encodeType_ = ENCODE_TYPE_NULL;
1883     captureInfo2.type_ = CONTINUOUS_FRAME;
1884     captureInfos1.clear();
1885     captureInfos1.push_back(captureInfo2);
1886     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
1887     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
1888 }
1889 
1890 /**
1891  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_2100
1892  * @tc.name: testDistributedCameraStartCapture017
1893  * @tc.desc: StartCapture, captureInfo2.encodeType_ = ENCODE_TYPE_NULL, captureInfo2.type_ = SNAPSHOT_FRAME
1894  */
1895 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture017, Function | MediumTest | Level1)
1896 {
1897     dhBase.deviceId_ = testDeviceId;
1898     dhBase.dhId_ = testCameraDh;
1899     captureInfo2.streamIds_.push_back(1);
1900     captureInfo2.width_ = TEST_WIDTH;
1901     captureInfo2.height_ = TEST_HEIGTH;
1902     captureInfo2.stride_ = 1;
1903     captureInfo2.format_ = 1;
1904     captureInfo2.dataspace_ = 1;
1905     captureInfo2.encodeType_ = ENCODE_TYPE_NULL;
1906     captureInfo2.type_ = SNAPSHOT_FRAME;
1907     captureInfos1.clear();
1908     captureInfos1.push_back(captureInfo2);
1909     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
1910     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
1911 }
1912 
1913 /**
1914  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_2200
1915  * @tc.name: testDistributedCameraStartCapture018
1916  * @tc.desc: StartCapture, dhBase.deviceId_ = ""
1917  *           captureInfo2.encodeType_ = ENCODE_TYPE_NULL, captureInfo2.type_ = SNAPSHOT_FRAME
1918  */
1919 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture018, Function | MediumTest | Level1)
1920 {
1921     dhBase.deviceId_.clear();
1922     dhBase.dhId_ = testCameraDh;
1923     captureInfo2.streamIds_.push_back(1);
1924     captureInfo2.width_ = TEST_WIDTH;
1925     captureInfo2.height_ = TEST_HEIGTH;
1926     captureInfo2.stride_ = 1;
1927     captureInfo2.format_ = 1;
1928     captureInfo2.dataspace_ = 1;
1929     captureInfo2.encodeType_ = ENCODE_TYPE_NULL;
1930     captureInfo2.type_ = SNAPSHOT_FRAME;
1931     captureInfos1.clear();
1932     captureInfos1.push_back(captureInfo2);
1933     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
1934     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
1935 }
1936 
1937 /**
1938  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_2300
1939  * @tc.name: testDistributedCameraStartCapture019
1940  * @tc.desc: StartCapture, dhBase.deviceId_ = "", dhBase.dhId_ = ""
1941  *           captureInfo2.encodeType_ = ENCODE_TYPE_NULL, captureInfo2.type_ = SNAPSHOT_FRAME
1942  */
1943 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture019, Function | MediumTest | Level1)
1944 {
1945     dhBase.deviceId_.clear();
1946     dhBase.dhId_.clear();
1947     captureInfo2.streamIds_.push_back(1);
1948     captureInfo2.width_ = TEST_WIDTH;
1949     captureInfo2.height_ = TEST_HEIGTH;
1950     captureInfo2.stride_ = 1;
1951     captureInfo2.format_ = 1;
1952     captureInfo2.dataspace_ = 1;
1953     captureInfo2.encodeType_ = ENCODE_TYPE_NULL;
1954     captureInfo2.type_ = SNAPSHOT_FRAME;
1955     captureInfos1.clear();
1956     captureInfos1.push_back(captureInfo2);
1957     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
1958     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
1959 }
1960 
1961 /**
1962  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_2400
1963  * @tc.name: testDistributedCameraStartCapture020
1964  * @tc.desc: StartCapture, dhBase.dhId_ = ""
1965  *           captureInfo2.encodeType_ = ENCODE_TYPE_NULL, captureInfo2.type_ = SNAPSHOT_FRAME
1966  */
1967 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture020, Function | MediumTest | Level1)
1968 {
1969     dhBase.deviceId_ = testDeviceId;
1970     dhBase.dhId_.clear();
1971     captureInfo2.streamIds_.push_back(1);
1972     captureInfo2.width_ = TEST_WIDTH;
1973     captureInfo2.height_ = TEST_HEIGTH;
1974     captureInfo2.stride_ = 1;
1975     captureInfo2.format_ = 1;
1976     captureInfo2.dataspace_ = 1;
1977     captureInfo2.encodeType_ = ENCODE_TYPE_NULL;
1978     captureInfo2.type_ = SNAPSHOT_FRAME;
1979     captureInfos1.clear();
1980     captureInfos1.push_back(captureInfo2);
1981     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
1982     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
1983 }
1984 
1985 /**
1986  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_2500
1987  * @tc.name: testDistributedCameraStartCapture021
1988  * @tc.desc: StartCapture, dhBase.dhId_ = ""
1989  *           captureInfo2.encodeType_ = ENCODE_TYPE_JPEG, captureInfo2.type_ = SNAPSHOT_FRAME
1990  */
1991 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture021, Function | MediumTest | Level1)
1992 {
1993     dhBase.deviceId_ = testDeviceId;
1994     dhBase.dhId_.clear();
1995     captureInfo2.streamIds_.push_back(1);
1996     captureInfo2.width_ = TEST_WIDTH;
1997     captureInfo2.height_ = TEST_HEIGTH;
1998     captureInfo2.stride_ = 1;
1999     captureInfo2.format_ = 1;
2000     captureInfo2.dataspace_ = 1;
2001     captureInfo2.encodeType_ = ENCODE_TYPE_JPEG;
2002     captureInfo2.type_ = SNAPSHOT_FRAME;
2003     captureInfos1.clear();
2004     captureInfos1.push_back(captureInfo2);
2005     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
2006     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
2007 }
2008 
2009 /**
2010  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_2600
2011  * @tc.name: testDistributedCameraStartCapture022
2012  * @tc.desc: StartCapture, dhBase.deviceId_ = ""
2013  *           captureInfo2.encodeType_ = ENCODE_TYPE_JPEG, captureInfo2.type_ = SNAPSHOT_FRAME
2014  */
2015 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture022, Function | MediumTest | Level1)
2016 {
2017     dhBase.deviceId_.clear();
2018     dhBase.dhId_ = testCameraDh;
2019     captureInfo2.streamIds_.push_back(1);
2020     captureInfo2.width_ = TEST_WIDTH;
2021     captureInfo2.height_ = TEST_HEIGTH;
2022     captureInfo2.stride_ = 1;
2023     captureInfo2.format_ = 1;
2024     captureInfo2.dataspace_ = 1;
2025     captureInfo2.encodeType_ = ENCODE_TYPE_JPEG;
2026     captureInfo2.type_ = SNAPSHOT_FRAME;
2027     captureInfos1.clear();
2028     captureInfos1.push_back(captureInfo2);
2029     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
2030     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
2031 }
2032 
2033 /**
2034  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_2700
2035  * @tc.name: testDistributedCameraStartCapture023
2036  * @tc.desc: StartCapture, dhBase.deviceId_ = "", dhBase.dhId_ = ""
2037  *           captureInfo2.encodeType_ = ENCODE_TYPE_JPEG, captureInfo2.type_ = SNAPSHOT_FRAME
2038  */
2039 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture023, Function | MediumTest | Level1)
2040 {
2041     dhBase.deviceId_.clear();
2042     dhBase.dhId_.clear();
2043     captureInfo2.streamIds_.push_back(1);
2044     captureInfo2.width_ = TEST_WIDTH;
2045     captureInfo2.height_ = TEST_HEIGTH;
2046     captureInfo2.stride_ = 1;
2047     captureInfo2.format_ = 1;
2048     captureInfo2.dataspace_ = 1;
2049     captureInfo2.encodeType_ = ENCODE_TYPE_JPEG;
2050     captureInfo2.type_ = SNAPSHOT_FRAME;
2051     captureInfos1.clear();
2052     captureInfos1.push_back(captureInfo2);
2053     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
2054     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
2055 }
2056 
2057 /**
2058  * @tc.number: SUB_DH_Dcamera_HDI_StartCapture_2800
2059  * @tc.name: testDistributedCameraStartCapture024
2060  *           StartCapture, captureInfo2.encodeType_ = ENCODE_TYPE_JPEG, captureInfo2.type_ = SNAPSHOT_FRAME
2061  */
2062 HWTEST_F(DCameraProviderTest, testDistributedCameraStartCapture024, Function | MediumTest | Level1)
2063 {
2064     dhBase.deviceId_ = testDeviceId;
2065     dhBase.dhId_ = testCameraDh;
2066     captureInfo2.streamIds_.push_back(1);
2067     captureInfo2.width_ = TEST_WIDTH;
2068     captureInfo2.height_ = TEST_HEIGTH;
2069     captureInfo2.stride_ = 1;
2070     captureInfo2.format_ = 1;
2071     captureInfo2.dataspace_ = 1;
2072     captureInfo2.encodeType_ = ENCODE_TYPE_JPEG;
2073     captureInfo2.type_ = SNAPSHOT_FRAME;
2074     captureInfos1.clear();
2075     captureInfos1.push_back(captureInfo2);
2076     int32_t ret = cameraProvider.StartCapture(dhBase, captureInfos1);
2077     EXPECT_EQ(INVALID_ARGUMENT, ret) << "StartCapture fail";
2078 }
2079 
2080 /**
2081  * @tc.number: SUB_DH_Dcamera_HDI_StopCapture_0200
2082  * @tc.name: testDistributedCameraStopCapture001
2083  * @tc.desc: StopCapture, dhBase.deviceId_ = ""
2084  */
2085 HWTEST_F(DCameraProviderTest, testDistributedCameraStopCapture001, Function | MediumTest | Level1)
2086 {
2087     dhBase.deviceId_.clear();
2088     dhBase.dhId_ = testCameraDh;
2089     int32_t ret = cameraProvider.StopCapture(dhBase, streamIds);
2090     EXPECT_NE(0, ret) << "StopCapture fail";
2091 }
2092 
2093 /**
2094  * @tc.number: SUB_DH_Dcamera_HDI_StopCapture_0300
2095  * @tc.name: testDistributedCameraStopCapture002
2096  * @tc.desc: StopCapture, dhBase.dhId_ = ""
2097  */
2098 HWTEST_F(DCameraProviderTest, testDistributedCameraStopCapture002, Function | MediumTest | Level2)
2099 {
2100     dhBase.deviceId_ = testDeviceId;
2101     dhBase.dhId_.clear();
2102     int32_t ret = cameraProvider.StopCapture(dhBase, streamIds);
2103     EXPECT_NE(0, ret) << "StopCapture fail";
2104 }
2105 
2106 /**
2107  * @tc.number: SUB_DH_Dcamera_HDI_StopCapture_0400
2108  * @tc.name: testDistributedCameraStopCapture003
2109  * @tc.desc: StopCapture, dhBase.deviceId_ = "", dhBase.dhId_ = ""
2110  */
2111 HWTEST_F(DCameraProviderTest, testDistributedCameraStopCapture003, Function | MediumTest | Level2)
2112 {
2113     dhBase.deviceId_.clear();
2114     dhBase.dhId_.clear();
2115     int32_t ret = cameraProvider.StopCapture(dhBase, streamIds);
2116     EXPECT_NE(0, ret) << "StopCapture fail";
2117 }
2118 
2119 /**
2120  * @tc.number: SUB_DH_Dcamera_HDI_StopCapture_0500
2121  * @tc.name: testDistributedCameraStopCapture004
2122  * @tc.desc: StopCapture, streamIds.push_back(-1)
2123  */
2124 HWTEST_F(DCameraProviderTest, testDistributedCameraStopCapture004, Function | MediumTest | Level2)
2125 {
2126     dhBase.deviceId_ = testDeviceId;
2127     dhBase.dhId_ = testCameraDh;
2128     streamIds.pop_back();
2129     streamIds.push_back(-1);
2130     int32_t ret = cameraProvider.StopCapture(dhBase, streamIds);
2131     EXPECT_NE(0, ret) << "StopCapture fail";
2132 }
2133 
2134 /**
2135  * @tc.number: SUB_DH_Dcamera_HDI_StopCapture_0600
2136  * @tc.name: testDistributedCameraStopCapture005
2137  * @tc.desc: StopCapture, dhBase.deviceId_ = "", dhBase.dhId_ = "", streamIds.push_back(-1)
2138  */
2139 HWTEST_F(DCameraProviderTest, testDistributedCameraStopCapture005, Function | MediumTest | Level2)
2140 {
2141     dhBase.deviceId_.clear();
2142     dhBase.dhId_.clear();
2143     streamIds.pop_back();
2144     streamIds.push_back(-1);
2145     int32_t ret = cameraProvider.StopCapture(dhBase, streamIds);
2146     EXPECT_NE(0, ret) << "StopCapture fail";
2147 }
2148 
2149 /**
2150  * @tc.number: SUB_DH_Dcamera_HDI_StopCapture_0700
2151  * @tc.name: testDistributedCameraStopCapture006
2152  * @tc.desc: StopCapture, streamIds.push_back(0)
2153  */
2154 HWTEST_F(DCameraProviderTest, testDistributedCameraStopCapture006, Function | MediumTest | Level2)
2155 {
2156     dhBase.deviceId_ = testDeviceId;
2157     dhBase.dhId_ = testCameraDh;
2158     streamIds.pop_back();
2159     streamIds.push_back(0);
2160     int32_t ret = cameraProvider.StopCapture(dhBase, streamIds);
2161     EXPECT_NE(0, ret) << "StopCapture fail";
2162 }
2163 
2164 /**
2165  * @tc.number: SUB_DH_Dcamera_HDI_StopCapture_0800
2166  * @tc.name: testDistributedCameraStopCapture007
2167  * @tc.desc: StopCapture, dhBase.deviceId_ = "", dhBase.dhId_ = "", streamIds.push_back(0)
2168  */
2169 HWTEST_F(DCameraProviderTest, testDistributedCameraStopCapture007, Function | MediumTest | Level2)
2170 {
2171     dhBase.deviceId_.clear();
2172     dhBase.dhId_.clear();
2173     streamIds.pop_back();
2174     streamIds.push_back(0);
2175     int32_t ret = cameraProvider.StopCapture(dhBase, streamIds);
2176     EXPECT_NE(0, ret) << "StopCapture fail";
2177 }
2178 
2179 /**
2180  * @tc.number: SUB_DH_Dcamera_HDI_UpdateSettings_0300
2181  * @tc.name: testDistributedCameraUpdateSettings001
2182  * @tc.desc: UpdateSettings, dhBase.dhId_ = ""
2183  */
2184 HWTEST_F(DCameraProviderTest, testDistributedCameraUpdateSettings001, Function | MediumTest | Level2)
2185 {
2186     dhBase.deviceId_ = testDeviceId;
2187     dhBase.dhId_.clear();
2188     int32_t ret = cameraProvider.UpdateSettings(dhBase, settings);
2189     EXPECT_NE(0, ret) << "UpdateSettings fail";
2190 }
2191 
2192 /**
2193  * @tc.number: SUB_DH_Dcamera_HDI_UpdateSettings_0400
2194  * @tc.name: testDistributedCameraUpdateSettings002
2195  * @tc.desc: UpdateSettings, dhBase.deviceId_ = ""
2196  */
2197 HWTEST_F(DCameraProviderTest, testDistributedCameraUpdateSettings002, Function | MediumTest | Level2)
2198 {
2199     dhBase.deviceId_.clear();
2200     dhBase.dhId_ = testCameraDh;
2201     int32_t ret = cameraProvider.UpdateSettings(dhBase, settings);
2202     EXPECT_NE(0, ret) << "UpdateSettings fail";
2203 }
2204 
2205 /**
2206  * @tc.number: SUB_DH_Dcamera_HDI_UpdateSettings_0500
2207  * @tc.name: testDistributedCameraUpdateSettings003
2208  * @tc.desc: UpdateSettings, dhBase.deviceId_ = "", dhBase.dhId_ = ""
2209  */
2210 HWTEST_F(DCameraProviderTest, testDistributedCameraUpdateSettings003, Function | MediumTest | Level2)
2211 {
2212     dhBase.deviceId_.clear();
2213     dhBase.dhId_.clear();
2214     int32_t ret = cameraProvider.UpdateSettings(dhBase, settings);
2215     EXPECT_NE(0, ret) << "UpdateSettings fail";
2216 }
2217 
2218 /**
2219  * @tc.number: SUB_DH_Dcamera_HDI_UpdateSettings_0600
2220  * @tc.name: testDistributedCameraUpdateSettings004
2221  * @tc.desc: UpdateSettings, result.type_ = UPDATE_METADATA
2222  */
2223 HWTEST_F(DCameraProviderTest, testDistributedCameraUpdateSettings004, Function | MediumTest | Level2)
2224 {
2225     dhBase.deviceId_ = testDeviceId;
2226     dhBase.dhId_ = testCameraDh;
2227     result.type_ = UPDATE_METADATA;
2228     result.value_ = "SettingValue";
2229     settings.pop_back();
2230     settings.push_back(result);
2231     int32_t ret = cameraProvider.UpdateSettings(dhBase, settings);
2232     EXPECT_NE(0, ret) << "UpdateSettings fail";
2233 }
2234 
2235 /**
2236  * @tc.number: SUB_DH_Dcamera_HDI_UpdateSettings_0700
2237  * @tc.name: testDistributedCameraUpdateSettings005
2238  * @tc.desc: UpdateSettings, dhBase.dhId_ = "", result.type_ = UPDATE_METADATA
2239  */
2240 HWTEST_F(DCameraProviderTest, testDistributedCameraUpdateSettings005, Function | MediumTest | Level2)
2241 {
2242     dhBase.deviceId_ = testDeviceId;
2243     dhBase.dhId_.clear();
2244     result.type_ = UPDATE_METADATA;
2245     result.value_ = "SettingValue";
2246     settings.pop_back();
2247     settings.push_back(result);
2248     int32_t ret = cameraProvider.UpdateSettings(dhBase, settings);
2249     EXPECT_NE(0, ret) << "UpdateSettings fail";
2250 }
2251 
2252 /**
2253  * @tc.number: SUB_DH_Dcamera_HDI_UpdateSettings_0800
2254  * @tc.name: testDistributedCameraUpdateSettings006
2255  * @tc.desc: UpdateSettings, dhBase.deviceId_ = "", result.type_ = UPDATE_METADATA
2256  */
2257 HWTEST_F(DCameraProviderTest, testDistributedCameraUpdateSettings006, Function | MediumTest | Level2)
2258 {
2259     dhBase.deviceId_.clear();
2260     dhBase.dhId_ = testCameraDh;
2261     result.type_ = UPDATE_METADATA;
2262     result.value_ = "SettingValue";
2263     settings.pop_back();
2264     settings.push_back(result);
2265     int32_t ret = cameraProvider.UpdateSettings(dhBase, settings);
2266     EXPECT_NE(0, ret) << "UpdateSettings fail";
2267 }
2268 
2269 /**
2270  * @tc.number: SUB_DH_Dcamera_HDI_UpdateSettings_0900
2271  * @tc.name: testDistributedCameraUpdateSettings007
2272  * @tc.desc: UpdateSettings, dhBase.deviceId_ = "", result.type_ = ENABLE_METADATA
2273  */
2274 HWTEST_F(DCameraProviderTest, testDistributedCameraUpdateSettings007, Function | MediumTest | Level2)
2275 {
2276     dhBase.deviceId_.clear();
2277     dhBase.dhId_ = testCameraDh;
2278     result.type_ = ENABLE_METADATA;
2279     result.value_ = "SettingValue";
2280     settings.pop_back();
2281     settings.push_back(result);
2282     int32_t ret = cameraProvider.UpdateSettings(dhBase, settings);
2283     EXPECT_NE(0, ret) << "UpdateSettings fail";
2284 }
2285 
2286 /**
2287  * @tc.number: SUB_DH_Dcamera_HDI_UpdateSettings_1000
2288  * @tc.name: testDistributedCameraUpdateSettings008
2289  * @tc.desc: UpdateSettings, dhBase.dhId_ = "", result.type_ = ENABLE_METADATA
2290  */
2291 HWTEST_F(DCameraProviderTest, testDistributedCameraUpdateSettings008, Function | MediumTest | Level2)
2292 {
2293     dhBase.deviceId_ = testDeviceId;
2294     dhBase.dhId_.clear();
2295     result.type_ = ENABLE_METADATA;
2296     result.value_ = "SettingValue";
2297     settings.pop_back();
2298     settings.push_back(result);
2299     int32_t ret = cameraProvider.UpdateSettings(dhBase, settings);
2300     EXPECT_NE(0, ret) << "UpdateSettings fail";
2301 }
2302 
2303 /**
2304  * @tc.number: SUB_DH_Dcamera_HDI_UpdateSettings_1100
2305  * @tc.name: testDistributedCameraUpdateSettings009
2306  * @tc.desc: UpdateSettings, result.type_ = ENABLE_METADATA
2307  */
2308 HWTEST_F(DCameraProviderTest, testDistributedCameraUpdateSettings009, Function | MediumTest | Level2)
2309 {
2310     dhBase.deviceId_ = testDeviceId;
2311     dhBase.dhId_ = testCameraDh;
2312     result.type_ = ENABLE_METADATA;
2313     result.value_ = "SettingValue";
2314     settings.pop_back();
2315     settings.push_back(result);
2316     int32_t ret = cameraProvider.UpdateSettings(dhBase, settings);
2317     EXPECT_NE(0, ret) << "UpdateSettings fail";
2318 }
2319 
2320 /**
2321  * @tc.number: SUB_DH_Dcamera_HDI_UpdateSettings_1200
2322  * @tc.name: testDistributedCameraUpdateSettings010
2323  * @tc.desc: UpdateSettings, result.type_ = DISABLE_METADATA
2324  */
2325 HWTEST_F(DCameraProviderTest, testDistributedCameraUpdateSettings010, Function | MediumTest | Level2)
2326 {
2327     dhBase.deviceId_ = testDeviceId;
2328     dhBase.dhId_ = testCameraDh;
2329     result.type_ = DISABLE_METADATA;
2330     result.value_ = "SettingValue";
2331     settings.pop_back();
2332     settings.push_back(result);
2333     int32_t ret = cameraProvider.UpdateSettings(dhBase, settings);
2334     EXPECT_NE(0, ret) << "UpdateSettings fail";
2335 }
2336 
2337 /**
2338  * @tc.number: SUB_DH_Dcamera_HDI_UpdateSettings_1300
2339  * @tc.name: testDistributedCameraUpdateSettings011
2340  * @tc.desc: UpdateSettings, result.type_ = SET_FLASH_LIGHT
2341  */
2342 HWTEST_F(DCameraProviderTest, testDistributedCameraUpdateSettings011, Function | MediumTest | Level2)
2343 {
2344     dhBase.deviceId_ = testDeviceId;
2345     dhBase.dhId_ = testCameraDh;
2346     result.type_ = SET_FLASH_LIGHT;
2347     result.value_ = "SettingValue";
2348     settings.pop_back();
2349     settings.push_back(result);
2350     int32_t ret = cameraProvider.UpdateSettings(dhBase, settings);
2351     EXPECT_NE(0, ret) << "UpdateSettings fail";
2352 }
2353 
2354 /**
2355  * @tc.number: SUB_DH_Dcamera_HDI_UpdateSettings_1400
2356  * @tc.name: testDistributedCameraUpdateSettings012
2357  * @tc.desc: UpdateSettings, result.type_ = FPS_RANGE
2358  */
2359 HWTEST_F(DCameraProviderTest, testDistributedCameraUpdateSettings012, Function | MediumTest | Level2)
2360 {
2361     dhBase.deviceId_ = testDeviceId;
2362     dhBase.dhId_ = testCameraDh;
2363     result.type_ = FPS_RANGE;
2364     result.value_ = "SettingValue";
2365     settings.pop_back();
2366     settings.push_back(result);
2367     int32_t ret = cameraProvider.UpdateSettings(dhBase, settings);
2368     EXPECT_NE(0, ret) << "UpdateSettings fail";
2369 }
2370 
2371 /**
2372  * @tc.number: SUB_DH_Dcamera_HDI_UpdateSettings_1500
2373  * @tc.name: testDistributedCameraUpdateSettings013
2374  * @tc.desc: UpdateSettings, result.type_ = UPDATE_FRAME_METADATA
2375  */
2376 HWTEST_F(DCameraProviderTest, testDistributedCameraUpdateSettings013, Function | MediumTest | Level2)
2377 {
2378     dhBase.deviceId_ = testDeviceId;
2379     dhBase.dhId_ = testCameraDh;
2380     result.type_ = UPDATE_FRAME_METADATA;
2381     result.value_ = "SettingValue";
2382     settings.pop_back();
2383     settings.push_back(result);
2384     int32_t ret = cameraProvider.UpdateSettings(dhBase, settings);
2385     EXPECT_NE(0, ret) << "UpdateSettings fail";
2386 }
2387 
2388 /**
2389  * @tc.number: SUB_DH_Dcamera_HDI_UpdateSettings_1600
2390  * @tc.name: testDistributedCameraUpdateSettings014
2391  * @tc.desc: UpdateSettings, dhBase.dhId_ = "", result.type_ = UPDATE_FRAME_METADATA
2392  */
2393 HWTEST_F(DCameraProviderTest, testDistributedCameraUpdateSettings014, Function | MediumTest | Level2)
2394 {
2395     dhBase.deviceId_ = testDeviceId;
2396     dhBase.dhId_.clear();
2397     result.type_ = UPDATE_FRAME_METADATA;
2398     result.value_ = "SettingValue";
2399     settings.pop_back();
2400     settings.push_back(result);
2401     int32_t ret = cameraProvider.UpdateSettings(dhBase, settings);
2402     EXPECT_NE(0, ret) << "UpdateSettings fail";
2403 }
2404 
2405 } // namespace DistributedHardware
2406 } // namespace OHOS