OpenHarmony开发者论坛

标题: distributed_camera无法成功拍照 [打印本页]

作者: Zlarin    时间: 2023-12-12 11:25
标题: distributed_camera无法成功拍照
[md]**【模块名_概率】简要描述:**
使用C++直接调用camera_framework接口实现拍照功能,但阻塞在等待OnBufferAvailable。本地摄像头不会存在该问题。

**【环境信息】:**

- 网络环境:同一WIFI下,网络稳定
- 硬件开发板型号:DAYU200 * 2
- 软件版本信息或tag节点:OH 4.0.10.15
- 测试环境
- 其他

**【预置条件】:**

- 在OH中添加自己的模块,最终一同编译成二进制可执行文件烧入开发板
- 拍照代码:

```
    // 1. get manager instance and camera list
    OHOS::sptr<CameraManager> camManagerObj = CameraManager::GetInstance();
    std::vector<OHOS::sptr<CameraDevice>> cameraObjList =
        camManagerObj->GetSupportedCameras();
    std::cout << "camera obj list size = " << cameraObjList.size() << "\n";
    std::for_each(
        cameraObjList.begin(),
        cameraObjList.end(),
        [](const OHOS::sptr<CameraDevice> &camera) {
            std::cout << "id=" << camera->GetID() << ",\n"
                      << "position=" << camera->GetPosition() << ",\n"
                      << "cameraType=" << camera->GetCameraType() << ",\n"
                      << "connectionType=" << camera->GetConnectionType()
                      << "\n\n";
        }
    );

    // 2. open camera
    OHOS::sptr<CameraInput> cameraInput = nullptr;
    int32_t cameraId = this->id.value_or(0);
    int result =
        camManagerObj->CreateCameraInput(cameraObjList[cameraId], &cameraInput);
    if (result != CamServiceError::CAMERA_OK) {
        std::cout << "create camera input error\n";
        return -1;
    }

    std::cout << "camera ready to open\n";
    cameraInput->Open();
    std::cout << "camera open\n";

    // get output capability
    auto capability =
        camManagerObj->GetSupportedOutputCapability(cameraObjList[cameraId], 1);

    std::cout << "create session\n";
    // 3. open capture session
    OHOS::sptr<CaptureSession> captureSession =
        camManagerObj->CreateCaptureSession();

    // 4. config capture
    result = captureSession->BeginConfig();
    if (result != CamServiceError::CAMERA_OK) {
        std::cout << "config error" << std::endl;
        return -1;
    }

    // 5. add input into session
    std::cout << "add input\n";
    result = captureSession->AddInput((OHOS::sptr<CaptureInput> &) cameraInput);
    if (result != CamServiceError::CAMERA_OK) {
        printf("add input error: %d\n", result);
        return -1;
    }

    // 6. create consumer and register listener
    // 7. create output
    OHOS::sptr<OHOS::IConsumerSurface> photoSurface =
        OHOS::IConsumerSurface::Create();
    if (photoSurface == nullptr) {
        std::cout << "photoSurface is nullptr\n";
        return -1;
    }
    auto profiles = capability->GetPhotoProfiles();
    std::for_each(profiles.begin(), profiles.end(), [](Profile p) {
        auto [width, height] = p.GetSize();
        std::cout << "format=" << p.GetCameraFormat() << ", "
                  << "width=" << width << ", "
                  << "height" << height << "\n";
    });
    auto first_profile = capability->GetPhotoProfiles().front();
    Profile profile =
        Profile(first_profile.GetCameraFormat(), first_profile.GetSize());

    OHOS::sptr<CaptureSurfaceListener> captureListener =
        new (std::nothrow) CaptureSurfaceListener();
    captureListener->mode = OHOS::CameraStandard::SurfaceType:HOTO;
    captureListener->surface = photoSurface;
    photoSurface->RegisterConsumerListener(
        (OHOS::sptr<OHOS::IBufferConsumerListener> &) captureListener
    );

    OHOS::sptr<OHOS::IBufferProducer> surfaceProducer =
        photoSurface->GetProducer();
    if (surfaceProducer == nullptr) {
        std::cout << "surfaceProducer is nullptr\n";
        return -1;
    }

    OHOS::sptr<CaptureOutput> photoOutput =
        camManagerObj->CreatePhotoOutput(profile, surfaceProducer);

    // 8. add output to session
    std::cout << "add output\n";
    result = captureSession->AddOutput(photoOutput);
    if (result != CamServiceError::CAMERA_OK) {
        std::cout << "add output error" << std::endl;
        return -1;
    }

    // 9. commit session
    result = captureSession->CommitConfig();
    if (result != CamServiceError::CAMERA_OK) {
        std::cout << "commit config error: " << result << std::endl;
        return -1;
    }
    result = captureSession->Start();
    if (result != CamServiceError::CAMERA_OK) {
        std::cout << "session start error: " << result << std::endl;
        return -1;
    }

    // 10. real capture
    std::cout << "ready to capture\n";
    result = ((OHOS::sptr<hotoOutput> &) photoOutput)->Capture();
    if (result != CamServiceError::CAMERA_OK) {
        std::cout << "capture error: " << result << std::endl;
        return -1;
    }

    // wait for capture
    std::unique_lock<std::mutex> lk(captureLock);
    captureCond.wait(lk, []() { return captureReady; });

    std::cout << "capture finish\n";

    captureSession->Stop();
    cameraInput->Close();
    photoOutput->Release();

    // 11. release session
    captureSession->Release();

    // 12. release camera
    cameraInput->Release();

    return 0;
```

Buffer的监听模块:

```
class CaptureSurfaceListener : public OHOS::IBufferConsumerListener {
public:
    OHOS::CameraStandard::SurfaceType mode;
    OHOS::sptr<OHOS::Surface> surface;
    void OnBufferAvailable() override {
        std::unique_lock<std::mutex> lk(captureLock);

        int32_t flushFence = 0;
        int64_t timestamp = 0;
        OHOS::Rect damage;  // initialize the damage

        OHOS::sptr<OHOS::SurfaceBuffer> buffer = nullptr;
        surface->AcquireBuffer(buffer, flushFence, timestamp, damage);
        if (buffer != nullptr) {
            void *addr = buffer->GetVirAddr();
            int32_t size = buffer->GetSize();

            // Save the buffer(addr) to a file
            int fd = open("/data/output.jpg", O_CREAT | O_RDWR);
            if (fd <= 0) {
                std::cout << "cannot open /data/output.jpg\n";
            }
            int res = write(fd, addr, size);
            if (res < 0) {
                std::cout << "write error\n";
            }
            close(fd);

            std::cout << "image save\n";

            surface->ReleaseBuffer(buffer, -1);
        }
        std::cout << "capture surface buffer end\n";

        captureReady = true;
        captureCond.notify_one();
    }
};

```

**【测试步骤】:**

1. hdc shell进入终端环境
2. 调用实现好的程序:cameractl capture --camearId=1(其他实现细节没有在这里展示出来)
3. 在/data/目录下可以看到保存的output.jpg

**【预期结果】:**
以下为本地摄像头拍摄的输出:

```
# cameractl capture --cameraId=0
camera obj list size = 2
id=lcam001,
position=2,
cameraType=1,
connectionType=0

id=4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001,
position=2,
cameraType=1,
connectionType=2

camera ready to open
camera open
create session
add input
format=2000, width=1280, height960
add output
ready to capture
image save
capture surface buffer end
capture finish
```

**【实际结果】:**
以下为远程摄像头拍摄的输出

```
# cameractl capture --cameraId=1
camera obj list size = 2
id=lcam001,
position=2,
cameraType=1,
connectionType=0

id=4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001,
position=2,
cameraType=1,
connectionType=2

camera ready to open
camera open
create session
add input
format=2000, width=1280, height960
add output
ready to capture
**(此处阻塞)**
```

**【恢复手段】:**

**【出现概率】:问题出现次数/实际测试次数**

**【定位信息】:**

- 1. Log、截图、多媒体文件等,所有和问题有关的信息:

```
# hilog | grep Camera
12-11 19:08:41.948  2018  2018 I C01510/IPCObjectStub: 63: create, desc: ICameraServiceCallback
12-11 19:08:41.949   644   644 I C02b00/CAMERA: {SetCallback()-hcamera_service.cpp:495} HCameraService::SetCallback pid = 2018
12-11 19:08:41.949  2018  2018 I C01510/IPCObjectStub: 63: create, desc: ICameraMuteServiceCallback
12-11 19:08:41.949  2018  2018 I C01510/IPCObjectStub: 63: create, desc: IStandardCameraListener
12-11 19:08:41.949  2018  2018 D C02b00/CAMERA: {CameraListenerStub()-hcamera_listener_stub.cpp:27} 0x3834F0 Instances create
12-11 19:08:41.950   644   644 D C02b00/CAMERA: {CameraListenerProxy()-hcamera_listener_proxy.cpp:28} 0xC3F740 Instances create
12-11 19:08:41.966  2018  2018 I C02b00/CAMERA: {GetDmDeviceInfo()-camera_manager.cpp:585} CameraManager::size=1
12-11 19:08:41.967   644   644 I C02b00/CAMERA: {GetCameras()-hcamera_host_manager.cpp:513} HCameraHostManager::GetCameras
12-11 19:08:41.967   644   644 I C02b00/CAMERA: {FindCameraDeviceInfo()-hcamera_host_manager.cpp:386} CameraHostInfo::FindCameraDeviceInfo succeed for lcam001
12-11 19:08:41.967   644   644 I C02b00/CAMERA: {FindCameraDeviceInfo()-hcamera_host_manager.cpp:386} CameraHostInfo::FindCameraDeviceInfo succeed for 4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001
12-11 19:08:41.968   259   642 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921967,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","MSG":"CameraManager GetCameras camera ID:lcam001, Camera position:0, Camera Type:0, Connection Type:0, Mirror support:1"}.
12-11 19:08:41.968   259   642 D C02d10/HiView-EventServer: ReceiveMsg: receive from client {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921967,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","MSG":"CameraManager GetCameras camera ID:lcam001, Camera position:0, Camera Type:0, Connection Type:0, Mirror support:1"}
12-11 19:08:41.968   259   642 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921967,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","MSG":"CameraManager GetCameras camera ID:lcam001, Camera position:0, Camera Type:0, Connection Type:0, Mirror support:1"}.
12-11 19:08:41.968   259   642 D C02d10/HiView-SysEventSource: Parser: parser raw message size=208, {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921967,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","MSG":"CameraManager GetCameras camera ID:lcam001, Camera position:0, Camera Type:0, Connection Type:0, Mirror support:1"}
12-11 19:08:41.969   259   642 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921967,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","MSG":"CameraManager GetCameras camera ID:lcam001, Camera position:0, Camera Type:0, Connection Type:0, Mirror support:1"}.
12-11 19:08:41.969   259   642 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921967,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","MSG":"CameraManager GetCameras camera ID:lcam001, Camera position:0, Camera Type:0, Connection Type:0, Mirror support:1"}.
12-11 19:08:41.969   259   642 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921967,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","MSG":"CameraManager GetCameras camera ID:4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001, Camera position:0, Camera Type:0, Connection Type:2, Mirror support:1"}.
12-11 19:08:41.969   259   642 D C02d10/HiView-EventServer: ReceiveMsg: receive from client {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921967,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","MSG":"CameraManager GetCameras camera ID:4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001, Camera position:0, Camera Type:0, Connection Type:2, Mirror support:1"}
12-11 19:08:41.970   259   642 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921967,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","MSG":"CameraManager GetCameras camera ID:4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001, Camera position:0, Camera Type:0, Connection Type:2, Mirror support:1"}.
12-11 19:08:41.970   259   642 D C02d10/HiView-SysEventSource: Parser: parser raw message size=281, {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921967,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","MSG":"CameraManager GetCameras camera ID:4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001, Camera position:0, Camera Type:0, Connection Type:2, Mirror support:1"}
12-11 19:08:41.970   259   734 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921967,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"08494004347780433193","MSG":"CameraManager GetCameras camera ID:lcam001, Camera position:0, Camera Type:0, Connection Type:0, Mirror support:1","info_":""}.
12-11 19:08:41.970   259   642 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921967,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","MSG":"CameraManager GetCameras camera ID:4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001, Camera position:0, Camera Type:0, Connection Type:2, Mirror support:1"}.
12-11 19:08:41.970   259   642 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921967,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","MSG":"CameraManager GetCameras camera ID:4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001, Camera position:0, Camera Type:0, Connection Type:2, Mirror support:1"}.
12-11 19:08:41.970   368  1129 D C01700/RSS: EventDetail: {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921967,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"08494004347780433193","MSG":"CameraManager GetCameras camera ID:lcam001, Camera position:0, Camera Type:0, Connection Type:0, Mirror support:1","info_":"","level_":"MINOR","seq_":7828}
12-11 19:08:41.971   259   654 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921967,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"08494004347780433193","MSG":"CameraManager GetCameras camera ID:lcam001, Camera position:0, Camera Type:0, Connection Type:0, Mirror support:1","info_":""}.
12-11 19:08:41.973   259   734 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921967,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"07096723064320397103","MSG":"CameraManager GetCameras camera ID:4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001, Camera position:0, Camera Type:0, Connection Type:2, Mirror support:1","info_":""}.
12-11 19:08:41.973   368  1129 D C01700/RSS: EventDetail: {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921967,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"07096723064320397103","MSG":"CameraManager GetCameras camera ID:4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001, Camera position:0, Camera Type:0, Connection Type:2, Mirror support:1","info_":"","level_":"MINOR","seq_":7829}
12-11 19:08:41.974   259   642 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921967,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"07096723064320397103","MSG":"CameraManager GetCameras camera ID:4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001, Camera position:0, Camera Type:0, Connection Type:2, Mirror support:1","info_":""}.
12-11 19:08:41.975  2018  2018 I C02b00/CAMERA: {isDistributeCamera()-camera_manager.cpp:600} CameraManager::cameraId = lcam001
12-11 19:08:41.975  2018  2018 I C02b00/CAMERA: {CameraDevice()-camera_device.cpp:61} camera cameraid = lcam001, devicename: = , networkId =
12-11 19:08:41.975  2018  2018 I C02b00/CAMERA: {isDistributeCamera()-camera_manager.cpp:600} CameraManager::cameraId = 4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001
12-11 19:08:41.975  2018  2018 D C02b00/CAMERA: {GetSupportedCameras()-camera_manager.cpp:634} CameraManager::it is remoted camera
12-11 19:08:41.975  2018  2018 I C02b00/CAMERA: {CameraDevice()-camera_device.cpp:61} camera cameraid = 4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001, devicename: = OpenHarmony 3.2, networkId = 4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96
12-11 19:08:41.975  2018  2018 I C02b00/CAMERA: {ChooseDeFaultCameras()-camera_manager.cpp:662} ChooseDeFaultCameras need add default camera
12-11 19:08:41.975   644   644 I C02b00/CAMERA: {operator()()-hcamera_service.cpp:1454} HCameraService::IsDeviceAlreadyOpen cameraId: 4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001 opened 0
12-11 19:08:41.975   644   644 I C02b00/CAMERA: {operator()()-hcamera_service.cpp:1454} HCameraService::IsDeviceAlreadyOpen cameraId: lcam001 opened 0
12-11 19:08:41.975   644   644 I C02b00/CAMERA: {CameraConflictDetection()-hcamera_service.cpp:1493} There is no clients use device, allowed!
12-11 19:08:41.975   644   644 I C01510/IPCObjectStub: 63: create, desc: ICameraDeviceService
12-11 19:08:41.975   644   644 I C02b00/CAMERA: {HCameraDevice()-hcamera_device.cpp:28} HCameraDevice::HCameraDevice Contructor Camera: 4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001
12-11 19:08:41.975   644   644 I C02b00/CAMERA: {FindCameraDeviceInfo()-hcamera_host_manager.cpp:386} CameraHostInfo::FindCameraDeviceInfo succeed for 4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001
12-11 19:08:41.975   644   644 E C02b00/METADATA: FindCameraMetadataItemIndex item: 131075 not found
12-11 19:08:41.975   644   644 E C02b00/CAMERA: {IsCameraMuteSupported()-hcamera_service.cpp:658} HCameraService::IsCameraMuted not find MUTE ability
12-11 19:08:41.975   644   644 D C02b00/CAMERA: {IsCameraMuteSupported()-hcamera_service.cpp:663} HCameraService::IsCameraMuted supported: 0
12-11 19:08:41.976   644   644 E C02b00/CAMERA: {CreateCameraDevice()-hcamera_service.cpp:221} HCameraService::CreateCameraDevice MuteCamera not Supported
12-11 19:08:41.976   644   644 I C02b00/CAMERA: {CreateCameraDevice()-hcamera_service.cpp:233} HCameraService::CreateCameraDevice before insert! cameraId: 4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001, pid = 2018, devices size = 2, cameraIds size = 0
12-11 19:08:41.976   644   644 I C02b00/CAMERA: {~HCameraDevice()-hcamera_device.cpp:40} HCameraDevice::~HCameraDevice Destructor Camera: 4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001
12-11 19:08:41.976   644   644 W C01510/IPCObjectStub: 68: destroy, desc: ICameraDeviceService
12-11 19:08:41.976   644   644 I C02b00/CAMERA: {CreateCameraDevice()-hcamera_service.cpp:244} HCameraService::CreateCameraDevice after insert! cameraId: 4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001, pid = 2018, devices size = 2, cameraIds size = 1
12-11 19:08:41.976  2018  2018 I C02b00/CAMERA: {CameraInput()-camera_input.cpp:72} CameraInput::CameraInput Contructor!
12-11 19:08:41.976  2018  2018 I C02b00/CAMERA: {CameraInput()-camera_input.cpp:74} CameraInput::CameraInput Contructor Camera: 4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001
12-11 19:08:41.976  2018  2018 I C01510/IPCObjectStub: 63: create, desc: ICameraDeviceServiceCallback
12-11 19:08:41.977  2018  2018 D C02b00/CAMERA: {Open()-camera_input.cpp:99} Enter Into CameraInput::Open
12-11 19:08:41.977   259   642 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921976,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","MSG":"CameraManager_CreateCameraInput CameraId:4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001"}.
12-11 19:08:41.977   644   644 I C02b00/CAMERA: {Open()-hcamera_device.cpp:131} HCameraDevice::Open Camera:[4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001
12-11 19:08:41.977   259   642 D C02d10/HiView-EventServer: ReceiveMsg: receive from client {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921976,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","MSG":"CameraManager_CreateCameraInput CameraId:4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001"}
12-11 19:08:41.977   644   644 I C02b00/CAMERA: {DeviceOpen()-hcamera_service.cpp:1323} HCameraService:eviceOpen Enter
12-11 19:08:41.977   644   644 I C02b00/CAMERA: {DeviceOpen()-hcamera_service.cpp:1330} HCameraService:eviceOpen Camera:[4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001] need open
12-11 19:08:41.977   644   644 I C02b00/CAMERA: {OpenDevice()-hcamera_device.cpp:150} HCameraDevice::OpenDevice Opening camera device: 4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001
12-11 19:08:41.977   644   644 I C02b00/CAMERA: {OpenCameraDevice()-hcamera_host_manager.cpp:580} HCameraHostManager::OpenCameraDevice try to open camera = 4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001
12-11 19:08:41.977   259   642 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921976,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","MSG":"CameraManager_CreateCameraInput CameraId:4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001"}.
12-11 19:08:41.977   644   644 I C02b00/CAMERA: {OpenCamera()-hcamera_host_manager.cpp:218} CameraHostInfo::OpenCamera 4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001
12-11 19:08:41.977   644   644 I C02b00/CAMERA: {FindCameraDeviceInfo()-hcamera_host_manager.cpp:386} CameraHostInfo::FindCameraDeviceInfo succeed for 4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001
12-11 19:08:41.977   259   642 D C02d10/HiView-SysEventSource: Parser: parser raw message size=216, {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921976,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","MSG":"CameraManager_CreateCameraInput CameraId:4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001"}
12-11 19:08:41.977   644   644 I C02b00/CAMERA: {GetCameraHostVersion()-hcamera_host_manager.cpp:172} cameraHostProxy_ GetVersion majorVer_: 1, minorVers_: 0
12-11 19:08:41.978   644   644 I C01510/IPCObjectStub: 63: create, desc: ohos.hdi.camera.v1_0.ICameraDeviceCallback
12-11 19:08:41.978   259   642 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921976,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","MSG":"CameraManager_CreateCameraInput CameraId:4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001"}.
12-11 19:08:41.978  1509  1535 I C04100/DCAMERA: [distributedcamerahdf][OpenCamera][dcamera_host.cpp:123]CameraHost::OpenCamera for cameraId: 4f33******m001
12-11 19:08:41.978   259   642 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921976,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","MSG":"CameraManager_CreateCameraInput CameraId:4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001"}.
12-11 19:08:41.978  1509  1535 I C04100/DCAMERA: [distributedcamerahdf][OpenSession][dcamera_provider.cpp:209]CameraProvider::OpenSession for {devId: 4f33******df96, dhId: C******1}.
12-11 19:08:41.978  1492  1503 I C04100/DCAMERA: [dcamerasourcesvr][OpenSession][dcamera_source_dev.cpp:144]CameraSourceDev PostTask OpenSession devId 4f33******df96 dhId C******1
12-11 19:08:41.978  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][OnEvent][dcamera_source_dev.cpp:207]CameraSourceDev OnEvent devId 4f33******df96 dhId C******1 eventType: 2
12-11 19:08:41.978  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][OpenCamera][dcamera_source_dev.cpp:303]CameraSourceDev Execute OpenCamera devId 4f33******df96 dhId C******1
12-11 19:08:41.981   259   642 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"DISTCAMERA","name_":"DCAMERA_OPEN","type_":4,"time_":1702292921979,"tz_":"+0800","pid_":1492,"tid_":1565,"uid_":3052,"id_":"00000000000000000000","DEVID":"4f33******df96","DHID":"Camera_lcam001","MSG":"execute open camera event."}.
12-11 19:08:41.981   259   642 D C02d10/HiView-EventServer: ReceiveMsg: receive from client {"domain_":"DISTCAMERA","name_":"DCAMERA_OPEN","type_":4,"time_":1702292921979,"tz_":"+0800","pid_":1492,"tid_":1565,"uid_":3052,"id_":"00000000000000000000","DEVID":"4f33******df96","DHID":"Camera_lcam001","MSG":"execute open camera event."}
12-11 19:08:41.981   259   734 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921976,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00007625753736013399","MSG":"CameraManager_CreateCameraInput CameraId:4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001","info_":""}.
12-11 19:08:41.981   259   642 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"DISTCAMERA","name_":"DCAMERA_OPEN","type_":4,"time_":1702292921979,"tz_":"+0800","pid_":1492,"tid_":1565,"uid_":3052,"id_":"00000000000000000000","DEVID":"4f33******df96","DHID":"Camera_lcam001","MSG":"execute open camera event."}.
12-11 19:08:41.981   259   642 D C02d10/HiView-SysEventSource: Parser: parser raw message size=163, {"domain_":"DISTCAMERA","name_":"DCAMERA_OPEN","type_":4,"time_":1702292921979,"tz_":"+0800","pid_":1492,"tid_":1565,"uid_":3052,"id_":"00000000000000000000","DEVID":"4f33******df96","DHID":"Camera_lcam001","MSG":"execute open camera event."}
12-11 19:08:41.981   368  1129 D C01700/RSS: EventDetail: {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921976,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00007625753736013399","MSG":"CameraManager_CreateCameraInput CameraId:4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001","info_":"","level_":"MINOR","seq_":7830}
12-11 19:08:41.982   259   654 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_STATISTIC","type_":2,"time_":1702292921976,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00007625753736013399","MSG":"CameraManager_CreateCameraInput CameraId:4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001","info_":""}.
12-11 19:08:41.982   259   642 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"DISTCAMERA","name_":"DCAMERA_OPEN","type_":4,"time_":1702292921979,"tz_":"+0800","pid_":1492,"tid_":1565,"uid_":3052,"id_":"00000000000000000000","DEVID":"4f33******df96","DHID":"Camera_lcam001","MSG":"execute open camera event."}.
12-11 19:08:41.982   259   642 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"DISTCAMERA","name_":"DCAMERA_OPEN","type_":4,"time_":1702292921979,"tz_":"+0800","pid_":1492,"tid_":1565,"uid_":3052,"id_":"00000000000000000000","DEVID":"4f33******df96","DHID":"Camera_lcam001","MSG":"execute open camera event."}.
12-11 19:08:41.984   259   642 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"DISTCAMERA","name_":"DCAMERA_OPEN","type_":4,"time_":1702292921979,"tz_":"+0800","pid_":1492,"tid_":1565,"uid_":3052,"id_":"17375872878356101760","DEVID":"4f33******df96","DHID":"Camera_lcam001","MSG":"execute open camera event.","info_":""}.
12-11 19:08:42.645  1492  1565 D C04100/DCAMERA: [dcamerasourcesvr][OpenChannel][dcamera_source_controller.cpp:304]CameraSourceController OpenChannel devId: 4f33******df96, dhId: C******1 success
12-11 19:08:42.651  1492  1565 I C04100/DCAMERA: [dcamerachannel][CreateSession][dcamera_channel_source_impl.cpp:95]CameraChannelSourceImpl session create name: ohos.dhardware.dcamera_control devId: b793******0506
12-11 19:08:42.664  1492  1565 I C04100/DCAMERA: [dcamerachannel][CreateSoftbusSessionServer][dcamera_softbus_adapter.cpp:136]CameraSoftbusAdapter sessionName create ohos.dhardware.dcamera_control totalnum: 1
12-11 19:08:42.665  1492  1565 I C04100/DCAMERA: [dcamerachannel][OpenSession][dcamera_channel_source_impl.cpp:37]:DCameraChannelSourceImpl OpenSession name: ohos.dhardware.dcamera_control
12-11 19:08:42.665  1492  1565 I C04100/DCAMERA: [dcamerachannel][OpenSession][dcamera_softbus_session.cpp:66]:DCameraSoftbusSession OpenSession peerDevId: 4f33******df96 peerSessionName: ohos******trol
12-11 19:08:42.665  1492  1565 I C015c0/dsoftbus: [TRAN][OpenSession:199]OpenSession: mySessionName=ohos.dhardware.dcamera_control, peerSessionName=ohos.dhardware.dcamera_Camera_lcam001_control
12-11 19:08:42.687   632  1813 I C015c0/dsoftbus: [COMM][CompareString:267]src:ohos.dhardware.dcamera.* dest:ohos.dhardware.dcamera_Camera_lcam001_control
12-11 19:08:42.687   632  1813 I C015c0/dsoftbus: [COMM][PermIsSecLevelPublic:540]PermIsSecLevelPublic: ohos.dhardware.dcamera_Camera_lcam001_control is 1
12-11 19:08:42.714  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][OnSessionState][dcamera_source_controller.cpp:390]:DCameraSourceController OnSessionState state 1
12-11 19:08:43.178  1492  1503 I C04100/DCAMERA: [dcamerachannel][OnSourceSessionOpened][dcamera_softbus_adapter.cpp:282]:DCameraSoftbusAdapter OnSourceSessionOpened sessionId: 14, result: 0
12-11 19:08:43.178  1492  1503 I C04100/DCAMERA: [dcamerachannel][OnSessionOpend][dcamera_softbus_session.cpp:103]:DCameraSoftbusSession OnSessionOpend sessionId: 14 result: 0 peerDevId: 4f33******df96 peerSessionName: ohos******trol
12-11 19:08:43.178  1492  1503 I C04100/DCAMERA: [dcamerasourcesvr][OnSessionState][dcamera_source_controller.cpp:390]:DCameraSourceController OnSessionState state 2
12-11 19:08:43.179  1492  1503 I C04100/DCAMERA: [dcamerasourcesvr][UpdateState][dcamera_source_state_machine.cpp:55]:DCameraSourceStateMachine update state from 1 to 2
12-11 19:08:43.179  1492  1503 I C04100/DCAMERA: [dcamerachannel][OnSourceSessionOpened][dcamera_softbus_adapter.cpp:297]:DCameraSoftbusAdapter OnSourceSessionOpened sessionId: 14, result: 0 end
12-11 19:08:43.186  1492  1565 I C04100/DCAMERA: [dcamerachannel][StartSoftbusTimeSync][dcamera_softbus_latency.cpp:62]:DCameraSoftbusLatency:: StartSoftbusTimeSync success
12-11 19:08:43.186  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][NotifyHalResult][dcamera_source_dev.cpp:582]:DCameraSourceDev NotifyHalResult eventType: 2, result: 0 devId: 4f33******df96 dhId: C******1
12-11 19:08:43.187  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][OnEvent][dcamera_source_dev.cpp:207]:DCameraSourceDev OnEvent devId 4f33******df96 dhId C******1 eventType: 9
12-11 19:08:43.187  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][CameraEventNotify][dcamera_source_dev.cpp:535]:DCameraSourceDev Execute CameraEventNotify devId 4f33******df96 dhId C******1
12-11 19:08:43.188  1509  1534 I C04100/DCAMERA: [distributedcamerahdf][Notify][dcamera_provider.cpp:191]:DCameraProvider::Notify for {devId: 4f33******df96, dhId: C******1}.
12-11 19:08:43.188  1509  1534 I C04100/DCAMERA: [distributedcamerahdf][Notify][dcamera_device.cpp:394]:DCameraDevice::Notify for event type = 0, result = 1, content = .
12-11 19:08:43.188  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][DCameraNotify][dcamera_source_controller.cpp:190]:Nofify hal, ret: 0, devId: 4f33******df96 dhId: C******1, type: 0, result: 1, content:
12-11 19:08:43.190  1509  1535 I C04100/DCAMERA: [distributedcamerahdf][OpenCamera][dcamera_host.cpp:149]:DCameraHost::OpenCamera, open camera 4f33******m001 success.
12-11 19:08:43.190  1509  1535 I C01510/IPCObjectStub: 63: create, desc: ohos.hdi.camera.v1_0.ICameraDevice
12-11 19:08:43.193   644   644 I C02b00/CAMERA: {DeviceOpen()-hcamera_service.cpp:1337} HCameraService::DeviceOpen Exit
12-11 19:08:43.193   644   644 W C01510/BinderInvoker: 505: stub: ICameraDeviceService deal request code: 0 cost time: 1215ms
12-11 19:08:43.193  2018  2018 E C02b00/METADATA: FindCameraMetadataItemIndex item: 805306370 not found
12-11 19:08:43.200   644   644 I C02b00/CAMERA: {GetVersionByCamera()-hcamera_host_manager.cpp:567} GetVersionByCamera camera = 4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001
12-11 19:08:43.200   644   644 I C02b00/CAMERA: {GetCameraHostVersion()-hcamera_host_manager.cpp:172} cameraHostProxy_ GetVersion majorVer_: 1, minorVers_: 0
12-11 19:08:43.212   644   644 I C02b00/CAMERA: {FindCameraDeviceInfo()-hcamera_host_manager.cpp:386} CameraHostInfo::FindCameraDeviceInfo succeed for 4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001
12-11 19:08:43.212   644   644 E C02b00/METADATA: FindCameraMetadataItemIndex item: 805306370 not found
12-11 19:08:43.285  1509  1535 I C04100/DCAMERA: [distributedcamerahdf][ConfigureStreams][dcamera_provider.cpp:237]:DCameraProvider::ConfigureStreams for {devId: 4f33******df96, dhId: C******1}.
12-11 19:08:43.285  1492  1503 I C04100/DCAMERA: [dcamerasourcesvr][ConfigCameraStreams][dcamera_source_dev.cpp:162]:DCameraSourceDev PostTask ConfigStreams devId 4f33******df96 dhId C******1
12-11 19:08:43.286  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][OnEvent][dcamera_source_dev.cpp:207]:DCameraSourceDev OnEvent devId 4f33******df96 dhId C******1 eventType: 4
12-11 19:08:43.286  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][ConfigStreams][dcamera_source_dev.cpp:345]:DCameraSourceDev Execute ConfigStreams devId 4f33******df96 dhId C******1
12-11 19:08:43.286  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][ConfigStreams][dcamera_source_input.cpp:50]:DCameraSourceInput ConfigStreams devId 4f33******df96 dhId C******1, size: 1
12-11 19:08:43.286  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][ReleaseStreams][dcamera_source_data_process.cpp:112]:DCameraSourceDataProcess ReleaseStreams devId 4f33******df96 dhId C******1 streamType: 0
12-11 19:08:43.286  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][ReleaseStreams][dcamera_source_data_process.cpp:134]:DCameraSourceDataProcess ReleaseStreams devId 4f33******df96 dhId C******1 streamType: 0 streamProcessSize: 0 streams:
12-11 19:08:43.286  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][ReleaseStreams][dcamera_source_data_process.cpp:112]:DCameraSourceDataProcess ReleaseStreams devId 4f33******df96 dhId C******1 streamType: 1
12-11 19:08:43.286  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][ReleaseStreams][dcamera_source_data_process.cpp:134]:DCameraSourceDataProcess ReleaseStreams devId 4f33******df96 dhId C******1 streamType: 1 streamProcessSize: 0 streams:
12-11 19:08:43.286  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][ConfigStreams][dcamera_source_input.cpp:69]:DCameraSourceInput ConfigStreams devId: 4f33******df96, dhId: C******1, streamId: 1, width: 1280, height: 960,format: 4, dataspace: 8, encodeType:3 streamType: 1
12-11 19:08:43.286  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][ConfigStreams][dcamera_source_data_process.cpp:68]:DCameraSourceDataProcess ConfigStreams devId 4f33******df96 dhId C******1 streamType 0 size 0
12-11 19:08:43.286  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][ConfigStreams][dcamera_source_data_process.cpp:70]:DCameraSourceDataProcess ConfigStreams is empty
12-11 19:08:43.286  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][ConfigStreams][dcamera_source_data_process.cpp:68]:DCameraSourceDataProcess ConfigStreams devId 4f33******df96 dhId C******1 streamType 1 size 1
12-11 19:08:43.286  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][ConfigStreams][dcamera_source_data_process.cpp:81]:DCameraSourceDataProcess ConfigStreams devId 4f33******df96 dhId C******1, streamId: 1 info: width: 1280, height: 960,format: 4, dataspace: 8, encodeType: 3 streamType: 1
12-11 19:08:43.286  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][ConfigStreams][dcamera_source_data_process.cpp:94]:DCameraSourceDataProcess ConfigStreams devId 4f33******df96 dhId C******1, info: width: 1280, height: 960, format: 4,dataspace: 8, encodeType: 3 streamType: 1
12-11 19:08:43.286  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][DCameraStreamDataProcess][dcamera_stream_data_process.cpp:32]:DCameraStreamDataProcess Constructor devId 4f33******df96 dhId C******1
12-11 19:08:43.288  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][GetSinkRemoteCamSrv][dcamera_source_service_ipc.cpp:82]:DCameraSourceServiceIpc GetSinkRemoteCamSrv from cache devId: 4f33******df96
12-11 19:08:43.290   259   642 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_CONNECT","type_":2,"time_":1702292923289,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","ID":2018,"UID":0,"ID":"4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001","NAME":""}.
12-11 19:08:43.290   259   642 D C02d10/HiView-EventServer: ReceiveMsg: receive from client {"domain_":"CAMERA","name_":"CAMERA_CONNECT","type_":2,"time_":1702292923289,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","ID":2018,"UID":0,"ID":"4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001","NAME":""}
12-11 19:08:43.291   259   642 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_CONNECT","type_":2,"time_":1702292923289,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","ID":2018,"UID":0,"ID":"4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001","NAME":""}.
12-11 19:08:43.291   259   642 D C02d10/HiView-SysEventSource: Parser: parser raw message size=194, {"domain_":"CAMERA","name_":"CAMERA_CONNECT","type_":2,"time_":1702292923289,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","ID":2018,"UID":0,"ID":"4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001","NAME":""}
12-11 19:08:43.291   644   644 E C02b00/METADATA: FindCameraMetadataItemIndex item: 268435479 not found
12-11 19:08:43.291   259   642 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_CONNECT","type_":2,"time_":1702292923289,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","ID":2018,"UID":0,"ID":"4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001","NAME":""}.
12-11 19:08:43.292   259   642 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_CONNECT","type_":2,"time_":1702292923289,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"00000000000000000000","ID":2018,"UID":0,"ID":"4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001","NAME":""}.
12-11 19:08:43.292  1509  1535 I C04100/DCAMERA: [distributedcamerahdf][StartCapture][dcamera_provider.cpp:274]:DCameraProvider::StartCapture for {devId: 4f33******df96, dhId: C******1}.
12-11 19:08:43.292  1509  1535 I C04100/DCAMERA: [distributedcamerahdf][StartCapture][dcamera_provider.cpp:289]:DCameraProvider::StartCapture: ids=[1], width=1280, height=960, format=4, type=1, isCapture=1.
12-11 19:08:43.292  1492  1503 I C04100/DCAMERA: [dcamerasourcesvr][StartCameraCapture][dcamera_source_dev.cpp:180]:DCameraSourceDev PostTask StartCapture devId 4f33******df96 dhId C******1
12-11 19:08:43.293   259   734 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_CONNECT","type_":2,"time_":1702292923289,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"07867596163619083563","ID":2018,"UID":0,"ID":"4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001","NAME":"","info_":""}.
12-11 19:08:43.293   613   613 D C02962/StatsSvc: [battery_stats_listener.cpp:44] OnEvent# EventDetail: {"domain_":"CAMERA","name_":"CAMERA_CONNECT","type_":2,"time_":1702292923289,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"07867596163619083563","ID":2018,"UID":0,"ID":"4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001","NAME":"","info_":"","tag_":"owerStats","level_":"MINOR","seq_":7839}
12-11 19:08:43.294   613   613 D C02962/StatsSvc: [battery_stats_detector.cpp:40] HandleStatsChangedEvent# Handle type: STATS_TYPE_CAMERA_ON, state: 0, level: -1, uid: 0, pid: 2018, eventDataName: INVALID, eventDataType: -1, eventDataExtra: -1, time: 0, traffic: 0, deviceId: 4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001
12-11 19:08:43.294   613   613 D C02962/StatsSvc: [battery_stats_core.cpp:283] UpdateStats# Update for state, statsType: STATS_TYPE_CAMERA_ON, uid: 0, state: 0, level: -1,deviceId: 4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001
12-11 19:08:43.294   613   613 D C02962/StatsSvc: [battery_stats_core.cpp:340] UpdateCameraStats# Camera status: 0, Last camera uid: -1
12-11 19:08:43.294   613   613 D C02962/StatsSvc: [battery_stats_core.cpp:446] UpdateCameraTimer# Camera status: 0, uid: 0, deviceId: 4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001
12-11 19:08:43.295   259   654 D C02d10/HiView-DecodedEvent: Decoded event: {"domain_":"CAMERA","name_":"CAMERA_CONNECT","type_":2,"time_":1702292923289,"tz_":"+0800","pid_":644,"tid_":644,"uid_":1047,"id_":"07867596163619083563","PID":2018,"UID":0,"ID":"4f334b3d83a1192d7370d2ce8d325291e33462bb4b3166805d069bc1e461df96__Camera_lcam001","NAME":"","info_":""}.
12-11 19:08:43.359  1492  1565 D C04100/DCAMERA: [dcamerasourcesvr][ChannelNeg][dcamera_source_controller.cpp:165]:DCameraSourceController ChannelNeg devId: 4f33******df96, dhId: C******1 success
12-11 19:08:43.359  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][OpenChannel][dcamera_source_input.cpp:185]:DCameraSourceInput OpenChannel devId 4f33******df96 dhId C******1 continue state: 0, snapshot state: 0
12-11 19:08:43.365  1492  1565 I C04100/DCAMERA: [dcamerachannel][CreateSession][dcamera_channel_source_impl.cpp:95]:DCameraChannelSourceImpl session create name: ohos.dhardware.dcamera_dataContinue devId: b793******0506
12-11 19:08:43.378  1492  1565 I C04100/DCAMERA: [dcamerachannel][CreateSoftbusSessionServer][dcamera_softbus_adapter.cpp:136]:DCameraSoftbusAdapter sessionName create ohos.dhardware.dcamera_dataContinue totalnum: 1
12-11 19:08:43.379  1492  1565 I C04100/DCAMERA: [dcamerachannel][OpenSession][dcamera_channel_source_impl.cpp:37]:DCameraChannelSourceImpl OpenSession name: ohos.dhardware.dcamera_dataContinue
12-11 19:08:43.379  1492  1565 I C04100/DCAMERA: [dcamerachannel][OpenSession][dcamera_softbus_session.cpp:66]:DCameraSoftbusSession OpenSession peerDevId: 4f33******df96 peerSessionName: ohos******inue
12-11 19:08:43.379  1492  1565 I C015c0/dsoftbus: [TRAN][OpenSession:199]OpenSession: mySessionName=ohos.dhardware.dcamera_dataContinue, peerSessionName=ohos.dhardware.dcamera_Camera_lcam001_dataContinue
12-11 19:08:43.401   632  1813 I C015c0/dsoftbus: [COMM][CompareString:267]src:ohos.dhardware.dcamera.* dest:ohos.dhardware.dcamera_Camera_lcam001_dataContinue
12-11 19:08:43.401   632  1813 I C015c0/dsoftbus: [COMM][PermIsSecLevelPublic:540]PermIsSecLevelPublic: ohos.dhardware.dcamera_Camera_lcam001_dataContinue is 1
12-11 19:08:44.858  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][OnSessionState][dcamera_source_input.cpp:295]:DCameraSourceInput OnSessionState devId: 4f33******df96, dhId: C******1, streamType: 0, state: 1
12-11 19:08:44.858  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][OnSessionState][dcamera_source_input.cpp:314]:DCameraSourceInput OnSessionState state 1
12-11 19:08:44.969  1492  1503 I C04100/DCAMERA: [dcamerachannel][OnSourceSessionOpened][dcamera_softbus_adapter.cpp:282]:DCameraSoftbusAdapter OnSourceSessionOpened sessionId: 15, result: 0
12-11 19:08:44.969  1492  1503 I C04100/DCAMERA: [dcamerachannel][OnSessionOpend][dcamera_softbus_session.cpp:103]:DCameraSoftbusSession OnSessionOpend sessionId: 15 result: 0 peerDevId: 4f33******df96 peerSessionName: ohos******inue
12-11 19:08:44.969  1492  1503 I C04100/DCAMERA: [dcamerasourcesvr][OnSessionState][dcamera_source_input.cpp:295]:DCameraSourceInput OnSessionState devId: 4f33******df96, dhId: C******1, streamType: 0, state: 2
12-11 19:08:44.969  1492  1503 I C04100/DCAMERA: [dcamerasourcesvr][OnSessionState][dcamera_source_input.cpp:310]:DCameraSourceInput OnSessionState state 2
12-11 19:08:44.969  1492  1503 I C04100/DCAMERA: [dcamerachannel][OnSourceSessionOpened][dcamera_softbus_adapter.cpp:297]:DCameraSoftbusAdapter OnSourceSessionOpened sessionId: 15, result: 0 end
12-11 19:08:44.975  1492  1565 I C04100/DCAMERA: [dcamerachannel][CreateSession][dcamera_channel_source_impl.cpp:95]:DCameraChannelSourceImpl session create name: ohos.dhardware.dcamera_dataSnapshot devId: b793******0506
12-11 19:08:44.980  1492  1565 I C04100/DCAMERA: [dcamerachannel][CreateSoftbusSessionServer][dcamera_softbus_adapter.cpp:136]:DCameraSoftbusAdapter sessionName create ohos.dhardware.dcamera_dataSnapshot totalnum: 1
12-11 19:08:44.980  1492  1565 I C04100/DCAMERA: [dcamerachannel][OpenSession][dcamera_channel_source_impl.cpp:37]:DCameraChannelSourceImpl OpenSession name: ohos.dhardware.dcamera_dataSnapshot
12-11 19:08:44.980  1492  1565 I C04100/DCAMERA: [dcamerachannel][OpenSession][dcamera_softbus_session.cpp:66]:DCameraSoftbusSession OpenSession peerDevId: 4f33******df96 peerSessionName: ohos******shot
12-11 19:08:44.980  1492  1565 I C015c0/dsoftbus: [TRAN][OpenSession:199]OpenSession: mySessionName=ohos.dhardware.dcamera_dataSnapshot, peerSessionName=ohos.dhardware.dcamera_Camera_lcam001_dataSnapshot
12-11 19:08:44.989   632  1813 I C015c0/dsoftbus: [COMM][CompareString:267]src:ohos.dhardware.dcamera.* dest:ohos.dhardware.dcamera_Camera_lcam001_dataSnapshot
12-11 19:08:44.989   632  1813 I C015c0/dsoftbus: [COMM][PermIsSecLevelPublic:540]PermIsSecLevelPublic: ohos.dhardware.dcamera_Camera_lcam001_dataSnapshot is 1
12-11 19:08:45.009  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][OnSessionState][dcamera_source_input.cpp:295]:DCameraSourceInput OnSessionState devId: 4f33******df96, dhId: C******1, streamType: 1, state: 1
12-11 19:08:45.009  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][OnSessionState][dcamera_source_input.cpp:314]:DCameraSourceInput OnSessionState state 1
12-11 19:08:45.055  1492  1503 I C04100/DCAMERA: [dcamerachannel][OnSourceSessionOpened][dcamera_softbus_adapter.cpp:282]:DCameraSoftbusAdapter OnSourceSessionOpened sessionId: 16, result: 0
12-11 19:08:45.055  1492  1503 I C04100/DCAMERA: [dcamerachannel][OnSessionOpend][dcamera_softbus_session.cpp:103]:DCameraSoftbusSession OnSessionOpend sessionId: 16 result: 0 peerDevId: 4f33******df96 peerSessionName: ohos******shot
12-11 19:08:45.055  1492  1503 I C04100/DCAMERA: [dcamerasourcesvr][OnSessionState][dcamera_source_input.cpp:295]:DCameraSourceInput OnSessionState devId: 4f33******df96, dhId: C******1, streamType: 1, state: 2
12-11 19:08:45.055  1492  1503 I C04100/DCAMERA: [dcamerasourcesvr][OnSessionState][dcamera_source_input.cpp:310]:DCameraSourceInput OnSessionState state 2
12-11 19:08:45.055  1492  1503 I C04100/DCAMERA: [dcamerachannel][OnSourceSessionOpened][dcamera_softbus_adapter.cpp:297]:DCameraSoftbusAdapter OnSourceSessionOpened sessionId: 16, result: 0 end
12-11 19:08:45.055  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][UpdateState][dcamera_source_state_machine.cpp:55]:DCameraSourceStateMachine update state from 2 to 3
12-11 19:08:45.055  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][NotifyHalResult][dcamera_source_dev.cpp:582]:DCameraSourceDev NotifyHalResult eventType: 4, result: 0 devId: 4f33******df96 dhId: C******1
12-11 19:08:45.055  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][OnEvent][dcamera_source_dev.cpp:207]:DCameraSourceDev OnEvent devId 4f33******df96 dhId C******1 eventType: 6
12-11 19:08:45.055  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][StartCapture][dcamera_source_dev.cpp:413]:DCameraSourceDev Execute StartCapture devId 4f33******df96 dhId C******1
12-11 19:08:45.055  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][StartCapture][dcamera_source_input.cpp:135]:DCameraSourceInput StartCapture devId 4f33******df96 dhId C******1
12-11 19:08:45.055  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][StartCapture][dcamera_source_input.cpp:140]:DCameraSourceInput StartCapture devId 4f33******df96 dhId C******1 StartCapture id: 1
12-11 19:08:45.055  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][StartCapture][dcamera_source_input.cpp:144]:DCameraSourceInput StartCapture Inner devId 4f33******df96 dhId C******1 streamType: 1 idSize: 1 isCap: 1
12-11 19:08:45.055  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][StartCapture][dcamera_source_data_process.cpp:143]:DCameraSourceDataProcess StartCapture devId 4f33******df96 dhId C******1 width: 1280, height: 960, format: 4, isCapture: 1,dataspace: 8, encodeType: 3, streamType: 1
12-11 19:08:45.055  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][StartCapture][dcamera_source_data_process.cpp:154]:DCameraSourceDataProcess StartCapture devId 4f33******df96 dhId C******1 StartCapture id: 1
12-11 19:08:45.055  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][DCameraStreamDataProcessProducer][dcamera_stream_data_process_producer.cpp:38]:DCameraStreamDataProcessProducer Constructor devId 4f33******df96 dhId C******1 streamType: 1 streamId: 1
12-11 19:08:45.056  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][Start][dcamera_stream_data_process_producer.cpp:55]:DCameraStreamDataProcessProducer Start producer devId: 4f33******df96 dhId: C******1 streamType: 1 streamId: 1
12-11 19:08:45.060  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][UpdateState][dcamera_source_state_machine.cpp:55]:DCameraSourceStateMachine update state from 3 to 4
12-11 19:08:45.060  1492  1565 I C04100/DCAMERA: [dcamerasourcesvr][NotifyHalResult][dcamera_source_dev.cpp:582]:DCameraSourceDev NotifyHalResult eventType: 6, result: 0 devId: 4f33******df96 dhId: C******1
```

可以看到在拍摄过程中没有找到奇怪的Error,只是监听Buffer的操作没有被调用。不确定问题来源,由于camera_framework项目没有正确可编译的demo示例,可能这里的接口调用存在问题。同时也可能是分布式硬件的回调消息没有触发。

此外,分布式功能经过检验,使用分布式计算器等demo都能够正常运行。
[/md]
作者: 论坛小助手    时间: 2024-1-4 09:25
请问这个软件版本信息或 tag 节点:OH 4.0.10.15 在哪里取




欢迎光临 OpenHarmony开发者论坛 (https://forums.openharmony.cn/) Powered by Discuz! X3.5